Example1:
part of table test1:
name|mygroup| scale
----------------
ben | 1 | 1
tom | 1 | 2
jim | 2 | 1
tim | 2 | 2
..
the output should be:
name|mygroup| scale
----------------
ben | 1 | 1
jim | 2 | 1
I try:
select name,mygroup,min(scale) from test1 group by mygroup;
but it not give proper output.
Thanks
1 Answer