Advertisement

11.27.2007 at 10:50AM PST, ID: 22985726
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

How do I make a query that produces totals from a table with 3 categories and one condition?

Asked by ChrisTalbot in Microsoft Access Database

Tags: , ,

I have a ms-db with the following structure...
MCID      State      class      Qty    DiscountEligible      Revenue
111111      AZ      ABC      1      1      35
111111      AZ      ABC      2      1      35
111111      AZ      ABC      3      1      35
111111      AZ      ABC      4      1      35
111111      AZ      DEF      1      0      35
111111      AZ      DEF      1      0      35
111111      CO      ABC      1      1      35
111111      CO      ABC      1      1      35
111111      CO      DEF      1      0      35
111111      CO      DEF      1      0      35
111111      CO      GHI      1      1      70
111111      CO      GHI      3      1      70
111111      CO      GHI      5      1      70
111111      CO      GHI      7      1      70
I need to create three separate queries that will evaluate whether the record is Discount Eligible(1=yes) before processing the record.

First, I need a query that will provide a total by MCID.  The query needs to total all quantities but only add the revenue to the total if the record is eligible for a discount.  Such as
111111                  32            490
Second, I need a query that produces totals by MCID and state.  The query again needs to total all quantities but only add the revenue to the total if the record is eligible for a discount.  Such as
111111      AZ            12            140
111111      CO            20            350
Third, I need a query that produces totals by MCID, state, and class.  This query again needs to total all quantities but only add the revenue to the sub-total if the record is eligible for a discount.  Such as
111111      AZ      ABC      10            140
111111      AZ      DEF      2            0
111111      CO      ABC      2            70
111111      CO      DEF      2            0
111111      CO      GHI      16            280

As always, any help would be very much appreciated.

Start Free Trial
[+][-]11.27.2007 at 11:03AM PST, ID: 20360332

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.27.2007 at 11:04AM PST, ID: 20360340

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.27.2007 at 11:06AM PST, ID: 20360359

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Access Database
Tags: Microsoft, Access, 2003
Sign Up Now!
Solution Provided By: RDWaibel
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628