[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Find Max Value MS Access 2003

Posted on 2011-02-16
2
Medium Priority
?
338 Views
Last Modified: 2012-05-11
I am trying to find the max value in the Current column using ms access.
Table
ID    Name    Current
1      A           1
1      B           23
1      C           12  
2      A            22
2      B            9

So my end result with be the following:
ID  Name Current
1    B        23
2    A        22
0
Comment
Question by:asarda
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 34909961
select id, name, max(current) as maxcurrent
from tblname
group by id, name
0
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 2000 total points
ID: 34910008
Fixed

select g.id, MIN(name) as [Name], g.[Current]
from
(
select id, max([current]) as [Current]
from tblname
group by id
) g inner join tblname t on t.id=g.id
where g.[Current] = t.[Current]
group by g.id, g.[Current]
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

656 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