Advertisement

08.06.2008 at 11:06PM PDT, ID: 23628342
[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!

7.8

SQL-query: select max-value

Asked by efferz in SQL Query Syntax, Microsoft Access Database

Tags: , , ,

Hi,

having a table A which looks like

DATE                CRIT1                  CRIT2            CRIT3            X              Y              Z
1/1/1990           1/20/1990           300                black            23             2               5
1/1/1990           1/20/1990           300                black            4               1               4
1/1/1990           1/20/1990           310                black            10             4               4
1/1/1990           1/20/1990           320                white           4               5               4
1/2/1990           1/20/1990           340                red               0               1               5
1/2/1990           1/20/1990           340                red               3               1               6
1/2/1990           1/17/1990           310                white           20             2               5
2/1/1990           2/20/1990           320                black            6              2               5
2/1/1990           2/20/1990           320                black            4              2               5
2/1/1990           2/25/1990           350                black           24             2               5          

where for the same DATE there could be duplicate entries for the critaria combination CRIT1, CRIT2 and CRIT3. How to build a query which shows only the row with the max(X) value for duplicate criteria. The result should look like

DATE                CRIT1                  CRIT2            CRIT3            X              Y              Z
1/1/1990           1/20/1990           300                black            23             2               5
1/1/1990           1/20/1990           310                black            10             4               4
1/1/1990           1/20/1990           320                white           4               5               4
1/2/1990           1/20/1990           340                red               3               1               6
1/2/1990           1/17/1990           310                white           20             2               5
2/1/1990           2/20/1990           320                black            6              2               5
2/1/1990           2/25/1990           350                black           24             2               5          

Regards,
MartinStart Free Trial
[+][-]08.06.2008 at 11:13PM PDT, ID: 22178286

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.

 
[+][-]08.06.2008 at 11:25PM PDT, ID: 22178356

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

Zones: SQL Query Syntax, Microsoft Access Database
Tags: Microsoft, Access, 2000, SQL-Query
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.06.2008 at 11:56PM PDT, ID: 22178503

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.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628