SQL Query To Get Multiple Max Values From Multiple Columns
Posted
by
Sheridan
on Stack Overflow
See other posts from Stack Overflow
or by Sheridan
Published on 2012-09-26T21:36:25Z
Indexed on
2012/09/26
21:37 UTC
Read the original article
Hit count: 298
I am trying to figure out how to pull multiple max values from multiple columns. Here is some sample data:
DATE | A | B | C
4/4/2011 | 64.4 | 62.1 | 33.3
4/5/2011 | 34.6 | 33.5 | 32.3
4/6/2011 | 33.1 | 49.4 | 32.1
4/7/2011 | 55.2 | 32.8 | 33.5
4/8/2011 | 31.2 | 50.1 | 30.4
4/9/2011 | 31.7 | 31.1 | 30.4
I want the top 5 so:
4/4/2011 | 64.4
4/4/2011 | 62.1
4/7/2011 | 55.2
4/8/2011 | 50.1
4/6/2011 | 49.4
Thanks
© Stack Overflow or respective owner