G
Guest
I have a table for truck sales in canada by make of truck (there is about 8
makes). The records are for monthly sales. I would like to make a table
that has date descending in the left most column (in order to show most
recent results first), and a sum of the top three makes for that month in
column 2 (the top sellers change from month to month).
The data is stored in a large data table (named DTA, with the fields
DTE-date, KEY-items key, and VLE-value) and the descriptions are stored in an
items table (named ITEMS). These tables are linked on the item "key".
Therefore, a simple select query would look like this:
SELECT dta.dte, items.key FROM....WHERE items.key like 'CLASS8C' & '*';
The CLASS8C line restricts results to only those items pertaining to class 8
truck sales in canada. The keys for the various makes look like this:
CLASS8C_FRT, CLASS8C_PTRBLT, etc....
So, in brief, I want the query to display the sum of the top three makes for
each month - how would I do this???
Thanks,
makes). The records are for monthly sales. I would like to make a table
that has date descending in the left most column (in order to show most
recent results first), and a sum of the top three makes for that month in
column 2 (the top sellers change from month to month).
The data is stored in a large data table (named DTA, with the fields
DTE-date, KEY-items key, and VLE-value) and the descriptions are stored in an
items table (named ITEMS). These tables are linked on the item "key".
Therefore, a simple select query would look like this:
SELECT dta.dte, items.key FROM....WHERE items.key like 'CLASS8C' & '*';
The CLASS8C line restricts results to only those items pertaining to class 8
truck sales in canada. The keys for the various makes look like this:
CLASS8C_FRT, CLASS8C_PTRBLT, etc....
So, in brief, I want the query to display the sum of the top three makes for
each month - how would I do this???
Thanks,