I have a data table similar to below:
ID A B
10 5 blue
10 8 red
10 10 yellow
20 2 black
20 17 blue
30 7 red
30 12 green
30 50 black
Basically I want to write a mySQL query to output something like:
ID A B
10 5 blue
20 2 black
30 7 red
It gives only unique values of 'ID' and the minimum values of 'A' of each unique 'ID'. 'B' is just the extra data that goes along with it in the row.
What should my query look like?