I have table Races with the rows ID, Name and TotalCP . I SELECT MIN( TotalCP ) FROM Races, but then I want to select the entire row which have the minimum value. How I can make that, in a single query ?
I have table Races with the rows ID , Name and TotalCP . I
Share
The general form for getting a whole row from an aggregated value is:
or
However, in this case, since you’re using
MIN, you can just sort and take the first row: