我有一个准备好的 MySQL 查询,如下所示。假设 team1(第一桌)的成员玩特定的“游戏”(“游戏”是 team1 的条目)也可以是 team2(第二桌)的成员。我想获得不属于 team2 成员的 team1 玩“游戏”的成员数量。但我不知道我哪里出错了,因为查询失败:
SELECT game, member
FROM team2
WHERE game = :game and member
NOT IN (SELECT member FROM team1 WHERE game = :game)