I can't quite get this query to work how I want it to.
IF(h.STATUS="On-Login-Screen") OR (h.STATUS="IE-Window-Missing")
SELECT MAX(h.TIME) limit 1 AS LastDown
Essentially I want to check the last time h.Status equaled one of the above things, and get the most recent time when it does equal one of those things as a variable named LastDown.