Hi, I have a query that looks a bit like this:
SELECT weekEnd, MAX(timeMonday)
FROM timesheet
GROUP BY weekEnd
The valid values for timeMonday are: null, -1, 0, 1-24. At the moment, MAX() places the preference of those values in the order null, -1, 0, 1-24, however what I actually want is -1, null, 0, 1-24, so that null is considered higher than -1. I know MAX cant do this, so what's the easiest way to achieve it?
Thanks, Jack