Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: Calculating frequencies of order quantities

Results 1 to 3 of 3
Share This Thread →
  1. #1
    mjboyd10000 is offline Registered User
    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
    johnq7 is offline Registered User
    Join Date
    Mar 2010
    Location
    United States
    Posts
    11
    Rep Power
    0

    hey everyone

    just dropping by to say hey

  3. #3
    gk53's Avatar
    gk53 is online now Contributing User
    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,542
    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

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

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

ASP Free Advertisers and Affiliates