I have the following table
SELECT * FROM cars;
id value
1 convertible
2 van
2 wagon
3 scooter
3 segway
When I use the GROUP BY statement
SELECT * FROM cars
GROUP BY id;
I get the following result set
1 convertible
2 van
3 scooter
How can I change the above statement to select the cars.value that come alphabetically last? For example
1 convertible
2 wagon
3 segway
SELECT min(value) FROM cars
GROUP BY id;