sql server 2008 - select distinct user with max bill rate -


i have table has userids , bill rates. there multiple entries per id different bill rates. want output usernames corresponding highest bill rate.

id|billrate 1 |8.1 2 |9.4 2 |7.5 3 |7.9 3 |7.9 3 |4.6 4 |3.7 4 |9.8 

i need output like:

id|billrate 1 |8.1 2 |9.4 3 |7.9 4 |9.8 

try :

select id , max(billrate) table group id; 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -