February 14th, 2013, 04:01 PM
Calculating frequencies of order quantities
I am querying a table that has a line for each customer purchase incident.
I am trying to calculate the number of customers who have purchased 1X, 2X, etc.
Final output would look like:
Frequency Count of customers
count distinct(*) As Freq
group by Freq
but no success. All help is appreciated!
February 21st, 2013, 05:59 AM
just dropping by to say hey
February 28th, 2013, 11:29 AM
it looks like all what you need there
Select ID, count(*) as cnt
Group By ID
order by ID
if you found this post is useful click Give Rep button (bottom side on this reply ) and agree