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
Post a Comment