Access Query Help

Posted on 2009-02-11
Last Modified: 2012-05-06

I have joined 2 tables using a query in access, that works fine.  Just for reference, the Associd refers to a specific sales person, ssSaleKey refers to a specific sales transaction, and ssShare is either 1 or 0.5 depending on if the sale was split between 2 Associd's.

This info will be used in a crystal report later.  I need a query that will tell me how many sales each associate had on each day, including the half shares.  The code below is the query that joins the 2 tables so I have all of the info in one place.  I need a query from the below query.
SELECT [Sale Associate].Associd, [Sale Associate].ssSaleKey, [Sale Associate].ssShare, SalelineAssoc.slSaleKey, SalelineAssoc.SlDate

FROM [Sale Associate] INNER JOIN SalelineAssoc ON [Sale Associate].ssSaleKey=SalelineAssoc.slSaleKey;

Open in new window

Question by:seanrhudy
    1 Comment
    LVL 42

    Accepted Solution


    SELECT [Sale Associate].Associd, SalelineAssoc.SlDate, count(*) as SalesCount
    FROM [Sale Associate] INNER JOIN SalelineAssoc 
    ON [Sale Associate].ssSaleKey=SalelineAssoc.slSaleKey
    GROUP BY [Sale Associate].Associd, SalelineAssoc.SlDate

    Open in new window


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    As they say in love and is true in SQL: you can sum some Data some of the time, but you can't always aggregate all Data all the time! Introduction: By the end of this Article it is my intention to bring the meaning and value of the above quote to…
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now