Monday, 19 August 2013

MAX with extra critiera

MAX with extra critiera

I have the following part of a query I'm working on in MYSQL.
select
MAX(
CAST(MatchPlayerBatting.BatRuns AS SIGNED)
) AS HighestScore,
from MatchPlayerBatting
It returns the correct result. However there is another column I need it
to work off.
That is if the maximum value it finds also has a value of "not out" within
"BatHowOut", it should show the result as for example 96* rather than just
96.
How could this be done?

No comments:

Post a Comment