Jump to content

Finding max of columns sum


asmith

Recommended Posts

i tried the second and it works. The problem is if the sum of 2 rows is equal , that query shows only 1 row. 

 

select * from table where num1+num2 are max.  --> maybe 2 rows have the max number. so i could use mysql_num_rows for it to find out . 

 

I'm looking for only one query, otherwise i can use your query, save the max sum, then again run a query ke

 

select  ..... where num1+num2+num3 = the number from previous query

 

i'm just looking for the simplest way.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.