Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum and Group by Date

Status
Not open for further replies.

mcongdon

Programmer
Mar 14, 2008
98
US
This is both a report and a query question. I have a table with the following fields:

Date Rep Quantity Price

I want to create a report that takes the sum of (Quantity*Price) for each rep on each day of the month specified in an unbound form that launches the report. In the end, I want to be able to generate a report that gives me all the reps that had $250,000 or more in sales on each day of the month. I know how to limit it to the month that I specify, but I don't know how to have it sum each individual date.

Thanks for any help!
 
A starting point (SQL code):
Code:
SELECT [Date], Rep, Sum(Quantity*Price) AS Sales
FROM [i]yourTable[/i]
WHERE [i]you know how to limit it to the month[/i]
GROUP BY [Date], Rep

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top