I know we already have a few posts on similar topic. But I think this case a bit different and actually I couldn't get the result I wanted by answers given in other posts.
We have a table as below:
id code amount
------------------
1 A1 80
2 A1 75
3 A1 70
4 A1 70
5 A1 70
1 A2 92
2 A2 85
3 A2 79
4 A2 50
5 A2 50
How can I select the row for "A1" and "A2" based on first lowest value (from top) on "Amount" column? In this case I want the result like below:
id code amount
------------------
3 A1 70
4 A2 50
Thanks!