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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Top 5 Query Customization Question

Status
Not open for further replies.

stoynov

Technical User
Jul 24, 2000
4
US
I have a Total Union query that outputs the [Person Name] in column A lets assume at least 15 different people, then [Item Bought] in column B, [Cost] in Column C, and then [MonthendDate] in column D in the format "yyyymm". Assume that each person makes 4-100 purchases per month (could be for the same product as another person, but independant nonetheless) and that most people make a purchase each monthend, some not - ie: lets assume 2 years of history per person. For a given monthenddate (to be promted) what I need is ONE query that will run on top of this query to yield columns [A], , [C] and [D] columns only for the top 5 [C] for each [Person Name or A] - thus query will output 15*5 rows for a given monthend (assuming 15 persons made 5 purchases each - if no purchase for one person for specific monthend then no result, if one then only one will show up) for each person their top 5 [C] for a given monthend only. What I need to do afterwards once I have the query per month setup is to create a report that will graph the sum of the top five purchases per month per person through a given monthend - any ideas suggestions for that? Questions?

Thank you very very much for all your help!

Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top