Need help for a query

  • Thread starter Thread starter Denise
  • Start date Start date
D

Denise

I'm trying to create a report from a query that would give me a list of
companies with their maximum stock price and lowest stock price for the month
grouped by month and sorted by company name. I have been able to group it
and sort it, but unable to get the maximum and minimum stock price for the
month. It list all the prices for the entire month. Can someone please help.
 
Try this ---
SELECT Format([Sale Month Date], "yyyy mmm") AS Sale_Month, [company name],
Max([Sale Price]) AS Max_Price, Min([Sale Price]) AS Min_Price
FROM YourTable
GROUP BY Format([Sale Month Date], "yyyymm"), [company name]
ORDER BY Format([Sale Month Date];
 
Back
Top