#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Feb 2013
    Posts
    1
    Rep Power
    0

    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
    1 5000
    2 4000
    3 3000

    etc.

    I've tried:
    Select
    count distinct(*) As Freq
    From
    (Select
    VisitMaster.ID,
    count(*)
    From
    VisitMaster
    Group By
    VisitMaster.ID)
    group by Freq

    but no success. All help is appreciated!
  2. #2
  3. No Profile Picture
    Registered User

    Join Date
    Mar 2010
    Location
    United States
    Posts
    11
    Rep Power
    0

    hey everyone


    just dropping by to say hey
  4. #3
  5. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,581
    Rep Power
    278
    it looks like all what you need there
    Code:
    Select ID, count(*) as cnt
    	From VisitMaster
    	Group By ID
    order by ID
    GK
    __________________________________________________ _____
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree

Similar Threads

  1. Adding quantities of two separate tables together
    By bmatthie11 in forum Microsoft Access Help
    Replies: 7
    Last Post: August 19th, 2011, 01:48 PM
  2. Maintianing Inventory Quantities
    By manderson in forum Microsoft Access Help
    Replies: 1
    Last Post: January 28th, 2007, 08:58 PM
  3. Subtracting Quantities
    By rsm42 in forum .NET Development
    Replies: 4
    Last Post: January 7th, 2007, 08:49 AM
  4. Updating Quantities
    By rsm42 in forum .NET Development
    Replies: 2
    Last Post: December 30th, 2006, 10:44 AM
  5. summing quantities
    By phoenix9 in forum Microsoft Access Help
    Replies: 5
    Last Post: April 2nd, 2004, 10:27 AM

IMN logo majestic logo threadwatch logo seochat tools logo