的我有這個SQL連接:由多個指標分析
SELECT
artists.id,
actors.id,
actors.count
FROM
artists
INNER JOIN actors ON artists.title = actors.title;
演員表都得到了重複和一些counter
領域。所以不可能有
Tom Waits | 10
Tom Waits | 30
我怎樣才能改變我的第一個SQL所以它會返回只有那些演員,誰已經得到MAX(count)
喜歡的東西
SELECT
artists.id,
actors.id,
actors.count
FROM
artists
INNER JOIN actors ON artists.title = actors.title
HAVING MAX(actors.count);
最多投票的湯姆等待! –