A
Amanda Kelly
I have a table in access that is laid out like the following:
Mo Year Sold Price Mdl_line Mdl_yr Orig_resl_amt Gap VIN
(unique)
aug 2007 13400 PTH 050 17033.3 -5633.3
AlphaNum
aug 2007 13300 PTH 050 19818.1 -8518.1
" "
aug 2007 12000 PTH 050 16669.2 -5669.2
" "
sep 2007 14600 ALT 060 13310.4 1589.6
" "
I want a query to display results that produces the following:
- groups by Mdl_line and Mdl_year
- Mdl_year to read 2005 instead of 050 and 2006 instead of 060
- averages orig_resl_amt and calls it avg_res_amt
- averages Sold Price and calls it avg_sold_amt
- averages Gap and calls it avg_gap
- counts the number of VINs based on the grouping and month/year
- combines Mo and Year and puts them as column headings
Mdl_line Mdl_year Data Aug-07 Sep-07 Oct-07
PTH 2005 avg_res_amt 17840 12345 ...and so on...
--->
PTH 2005 avg_sold amt 12900 23456 ...and so on...
--->
PTH 2005 avg_gap -6607 -7706 ...and so
on... --->
PTH 2005 volume 235 335 ...and so
on... --->
ALT 2006 avg_res_amt 15000 13310
ALT 2006 avg_sold amt 17000 14600
ALT 2006 avg_gap -2000 1590
ALT 2006 volume 15000 15500
*this actually is from my excel pivot...i just want it in access so the
reporting will be easier.
Any help would be greatly appreciated.
Thank you,
Mo Year Sold Price Mdl_line Mdl_yr Orig_resl_amt Gap VIN
(unique)
aug 2007 13400 PTH 050 17033.3 -5633.3
AlphaNum
aug 2007 13300 PTH 050 19818.1 -8518.1
" "
aug 2007 12000 PTH 050 16669.2 -5669.2
" "
sep 2007 14600 ALT 060 13310.4 1589.6
" "
I want a query to display results that produces the following:
- groups by Mdl_line and Mdl_year
- Mdl_year to read 2005 instead of 050 and 2006 instead of 060
- averages orig_resl_amt and calls it avg_res_amt
- averages Sold Price and calls it avg_sold_amt
- averages Gap and calls it avg_gap
- counts the number of VINs based on the grouping and month/year
- combines Mo and Year and puts them as column headings
Mdl_line Mdl_year Data Aug-07 Sep-07 Oct-07
PTH 2005 avg_res_amt 17840 12345 ...and so on...
--->
PTH 2005 avg_sold amt 12900 23456 ...and so on...
--->
PTH 2005 avg_gap -6607 -7706 ...and so
on... --->
PTH 2005 volume 235 335 ...and so
on... --->
ALT 2006 avg_res_amt 15000 13310
ALT 2006 avg_sold amt 17000 14600
ALT 2006 avg_gap -2000 1590
ALT 2006 volume 15000 15500
*this actually is from my excel pivot...i just want it in access so the
reporting will be easier.
Any help would be greatly appreciated.
Thank you,