Consider this table:
id game point
1 x 5
1 z 4
2 y 6
3 x 2
3 y 5
3 z 8
How do I select the ids that have the minimum value in the point column, grouped by game? Like this:
id game point
1 z 4
2 y 6
3 x 2
Select tbl.* From TableName tbl Inner Join ( Select Id,MIN(Point) MinPoint From TableName Group By Id )tbl1 On tbl1.id=tbl.id Where tbl1.MinPoint=tbl.Point