Use a second where clause after 'MAX()
Posted: Wed Oct 19, 2011 12:40 pm
I can run this query SELECT * FROM count2 WHERE numb2 = (SELECT max( numb2 )FROM count2); and get a result.
I would like to throw in a second where clause in there like this:
SELECT * FROM count2 WHERE numb2 = ( SELECT MAX( numb2 ) FROM count2 WHERE Ball = 1 )
When I do this however, It will not isolate only the MAX(numb2 ) where Ball = 1 ; it brings up multiple other numbers other than Ball = 1.
Is there a way to do this?
I would like to throw in a second where clause in there like this:
SELECT * FROM count2 WHERE numb2 = ( SELECT MAX( numb2 ) FROM count2 WHERE Ball = 1 )
When I do this however, It will not isolate only the MAX(numb2 ) where Ball = 1 ; it brings up multiple other numbers other than Ball = 1.
Is there a way to do this?