M
Maxie
I have a query problem. Below is a query that works.
However, since I'm trying to do such a simple thing, I
can't help but think that there must be a much easier way
to do what I'm trying to do here.
SELECT ticker, date, close
FROM pub_price_history
WHERE date in (SELECT DISTINCT TOP 1 date from
pub_price_history ORDER BY date DESC);
All I want to do is for each ticker in the table, to get
the record with the latest closing price.
In case, it helps: pub_price_history is a table with three
fields: the date, the ticker symbol and the day's closing
price.
Is there a simpler and easier way?
Thanks,
Maxie III
However, since I'm trying to do such a simple thing, I
can't help but think that there must be a much easier way
to do what I'm trying to do here.
SELECT ticker, date, close
FROM pub_price_history
WHERE date in (SELECT DISTINCT TOP 1 date from
pub_price_history ORDER BY date DESC);
All I want to do is for each ticker in the table, to get
the record with the latest closing price.
In case, it helps: pub_price_history is a table with three
fields: the date, the ticker symbol and the day's closing
price.
Is there a simpler and easier way?
Thanks,
Maxie III