Access Query Help

Posted on 2009-02-11
Medium Priority
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:Sean Rhudy
1 Comment
LVL 42

Accepted Solution

dqmq earned 1000 total points
ID: 23612974

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

850 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