469,317 Members | 1,835 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

Perform a select statement to get lower values by id

15
Hi,

supposedly i have this table:
Expand|Select|Wrap|Line Numbers
  1. ID   Value
  2. 1     22
  3. 1     17
  4. 2     14
  5. 2     01
  6. 2     55
  7. 3     20
  8. 4     36
  9. 4     40
  10. 4     51
  11. 4     38
  12.  
and i want to select those records only:
Expand|Select|Wrap|Line Numbers
  1. ID   Value
  2. 1     17
  3. 2     01
  4. 3     20
  5. 4     36
  6.  
which means that i need the lowest values by id..

seems to be easy enough to accomplish, but i've gotten myself stuck on it...

thanks for any help
Aug 11 '10 #1
1 1111
ck9663
2,878 Expert 2GB
will a...

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT ID, MIN(Value) from YourTable Group by ID
  3.  
  4.  
work?

Happy Coding!!!

~~ CK
Aug 11 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Michael Seele | last post: by
1 post views Thread by serena.delossantos | last post: by
2 posts views Thread by bhanab | last post: by
3 posts views Thread by =?Utf-8?B?TWlrZSBD?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.