ErickaMeade
Registered User.
- Local time
- Today, 09:50
- Joined
- May 26, 2014
- Messages
- 10
I have created a query to get a count of items based on "Pricing Category" and "Location" columns. If I leave the query to only include the location, amount, and pricing category then I get the desired count. However, I need to build another query off this, so I need to carry another column through for the next query to be accurate. When I add that data column then my counts get screwed up. Please see attached example of how I can get an accurate count, how it looks with the added column, and the desired output that I am looking for.
Is there a way to count the Pricing Category without any consideration of the Model column?
Is there a way to count the Pricing Category without any consideration of the Model column?
Code:
SELECT DISTINCT [Master Oracle].Location, [Master Oracle].Model, [Master Oracle].Amount, [Master Oracle].[Pricing Category], Count([Pricing Category] & [Location]) AS CntPCat
FROM [Master Oracle]
GROUP BY [Master Oracle].Location, [Master Oracle].Model, [Master Oracle].Amount, [Master Oracle].[Pricing Category];