LeTenken
December 28th, 2007, 11:46 PM
I am not too familiar with SQL, any help will be appreciated.
Lets say I wrote a select statement that returned something like this:
Name x y
Bob 1 2
Bob 3 5
Bob 10 10
Frank 1 3
Chris 2 2
Chris 2 3
how would i narrow my query down to only one instance of Bob and Chris where x+y is the largest total?
i hope to get a new query that will make this output:
Name x y
Bob 10 10
Frank 1 3
Chris 2 3
please let me know if i should include any additional information.
Lets say I wrote a select statement that returned something like this:
Name x y
Bob 1 2
Bob 3 5
Bob 10 10
Frank 1 3
Chris 2 2
Chris 2 3
how would i narrow my query down to only one instance of Bob and Chris where x+y is the largest total?
i hope to get a new query that will make this output:
Name x y
Bob 10 10
Frank 1 3
Chris 2 3
please let me know if i should include any additional information.