2.7. 彙總查詢
SELECT max(temp_lo) FROM weather; max
-----
46
(1 row)SELECT city FROM weather WHERE temp_lo = max(temp_lo); WRONGSELECT city FROM weather
WHERE temp_lo = (SELECT max(temp_lo) FROM weather); city
---------------
San Francisco
(1 row)Was this helpful?