mysql select statement

admin

Administrator
Staff member
Hi there,

I have a table with, for example, 3 columns... like below

POINTS ASSISTS GOALS
2 3 5
4 6 2


how can I issue a SELECT statement that will show me only the 1 entry with the highest totals? If I were to write the SQL statement in partial english it'd look like:

SELECT * FROM mytable ORDER BY (points+assists+goals) DESC

I am only looking for the row with the highest total... in my example above I'd like to see row 2 returned since its total is 12 and row 1's is only 10.

Any help would be appreciated.

Thanks!
 
Back
Top