Click here to Skip to main content
15,889,411 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
The data are shown below.
VB
playerNo Score
1       100
1       110
1       120
1       130
1       140
1       150
2       100
2       200
2       300
3       100
3       120
3       104
3       160
4       110
4       106
4       140
5       110
5       120
5       140


The result should be shown in following.
playerNo  Score
1         150
2         300
3         160
4         140
5         140
Posted

Try this.
select playerNo, MAX(Score) from tablename group by playerNo
 
Share this answer
 
v2
Comments
z4rk 8-Jul-11 0:07am    
Thanks.
SELECT distinct playerNo,(SELECT Max(score) AS score FROM table1 as a WHERE a.playerNo = b.playerNo) FROM table1 AS B
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900