Good Evening,
This is an awesome collection of information in these forums. I have the query below that returns data as follows:
Now it returns:
cpe_mkt Model Count
Atlanta mod1 4
Atlanta mod2 7
Charlotte mod1 2
Charlotte mod2 1
Is there any way to make the results only show one set of cpe_mkt in the rows, then show a column with the count for each model type?
Would like it to show:
cpe_mkt mod1 mod2
Atlanta 4 7
Charlotte 2 1
here is my current query.
Select CPE_MKT, MODEL , count(*)
FROM CPE.CPE_INVENTORY
LEFT JOIN CPE.CPE_MANUFACTUERS
ON CPE_INVENTORY.MANUFACTURE_ID=CPE_MANUFACTUERS.MANU FACTURE_ID
LEFT JOIN CPE.CPE_MODEL
ON CPE_INVENTORY.MODEL_ID=CPE_MODEL.CPE_MODEL_ID
LEFT JOIN CPE.CPE_LOCATIONS
ON CPE_INVENTORY.CPELOCATION_ID=CPE_LOCATIONS.CPE_LOC ATION_ID
WHERE CPE.CPE_INVENTORY.CPESTATUS_ID = (4) -- status id 4 = inservice
and MANUFACTURE_NAME = 'CISCO'
and CPE_INVENTORY.LASTMODIFIEDDTS between to_date ( '12/07/2009', 'MM/DD/YYYY') and to_date ( '12/15/2009', 'MM/DD/YYYY')
and CPE.CPE_INVENTORY.LASTMODIFIEDBY not like 'ntwscan_EXT_UPD'
group by CPE_MKT, MODEL
ORDER BY MODEL,CPE_MKT
Thank you for any help you can provide