G
Greg
HI All
I am trying to get the last or latest stock price from table of daily
stock prices of companies i keep track of.
I have a daily-stock-price table and when i do the query using the max
function i get far to many records
I am have about 190 or so companies, however this code returns about 56,
000
If i do the query without the close price (Close) it returns the last
date as expected for each comapny, but when i add the close field i get
to many. not sure what it is doing
SELECT [Daily-Stock-Prices].Code, Max([Daily-Stock-Prices].Date) AS
MaxOfDate, [Daily-Stock-Prices].Close
FROM [Daily-Stock-Prices]
GROUP BY [Daily-Stock-Prices].Code, [Daily-Stock-Prices].Close
having max([Daily-Stock-Prices].date );
Hope someone can help
Greg
I am trying to get the last or latest stock price from table of daily
stock prices of companies i keep track of.
I have a daily-stock-price table and when i do the query using the max
function i get far to many records
I am have about 190 or so companies, however this code returns about 56,
000
If i do the query without the close price (Close) it returns the last
date as expected for each comapny, but when i add the close field i get
to many. not sure what it is doing
SELECT [Daily-Stock-Prices].Code, Max([Daily-Stock-Prices].Date) AS
MaxOfDate, [Daily-Stock-Prices].Close
FROM [Daily-Stock-Prices]
GROUP BY [Daily-Stock-Prices].Code, [Daily-Stock-Prices].Close
having max([Daily-Stock-Prices].date );
Hope someone can help
Greg