查询似乎没有任何问题,但我的数据库没有输出。
SELECT
Salaries.playerID
FROM
Teams
INNER JOIN
Salaries ON Teams.teamID = Salaries.teamID
WHERE
(Salaries.salary > (SELECT MIN(Salaries.salary)
FROM Salaries
INNER JOIN Teams ON Salaries.teamID = Teams.teamID
WHERE (Teams.name = 'Boston Red Sox')
GROUP BY Teams.name)
)
AND (Teams.name = 'Yankees')