我陷入了这个MYSQL SELECT:
SELECT episode.name
FROM tv.episode
JOIN tv.show ON episode.show_id = show.id
WHERE show.id = 73545
AND season_number = 4
AND episode.number =(SELECT MAX(number) FROM tv.episode WHERE season_number = 4)
返回0行
第二个选择的返回值为22,因此可以正常工作。
你能指出我正确的方向吗?
谢谢!
答案 0 :(得分:1)
您的子查询中未包含WHERE show.id = 73545
MAX
。