为什么这个查询会给出奇怪的结果..
SELECT max(greatest(home_team_total,away_team_total)) AS max_team_score, id
FROM `match`
WHERE id IN (1,2,3,4,5)
尽管
SELECT greatest(home_team_total,away_team_total) AS max_team_score, id
FROM `match`
WHERE id IN (1,2,3,4,5)
ORDER BY max_team_score DESC
LIMIT 1
给出正确的结果..
最大值仅在两种情况下都是正确的,但匹配的 id 在第一种情况下是错误的..