I have searched desperately for the answer to a seemingly easy query to pull off- but no luck in finding the answer so far. I am hoping someone can at least point me in the right direction.
Say I have a table with rope colors and sizes (inches) with the columns: color, inches
.
If the values in color and inches, respectively, are:
Red 38
Red 45
Yellow 12
Blue 85
Blue 12
Blue 18
I want to query for the longest rope of a single color. Ideally, the query would return:
Red 45
Yellow 12
Blue 85
How could I search for this using SQL queries?
Thank you all!