Hi
I have a table that looks like this:
Store ---- Dept -----Item
A ZZ Apple
A ZZ Orange
A YY Apple
A KK Apple
B ZZ Apple
B WW Orange
B WW Pear
B WW Pear
..
I am trying to write a query to return how many items (count) in each Store/Dept.
So, for Atore A, DEPT ZZ, the Query should return 2
For Store b, Dept WWW, the query should return 3
I am stuck on getting the desired count. I grouped by Store and Dept but can't figure out the count part as mentioned above.
Any SQL statement help or hint on how to write this would be greatly appreciated.
thanks