あなたはそれを試すことができます、それは少し冗長ですが、それは機能します:
SELECT
name,
max(Updated_on) as Updated_on,
STATUS
FROM userstatus a
WHERE (name, Updated_on) not in
(select name, max(Updated_on) FROM userstatus group by name)
group by name, status
HAVING UPDATED_ON =
(SELECT MAX(UPDATED_ON) FROM userstatus b where a.name = b.name
and (b.name, b.Updated_on) not in
(select name, max(Updated_on) FROM userstatus group by name)
group by name);