We help IT Professionals succeed at work.

Access Query Help

Sean Rhudy
Sean Rhudy asked
on
Medium Priority
190 Views
Last Modified: 2012-05-06
Hello,

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

Comment
Watch Question

Commented:

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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.