我对 SQL 很陌生,我正在努力练习以提高自己。
我有一个数据库,它有一个
表:球员、球队、比赛和胜利
玩家:pid、pname、年龄、国家
播放:pid, season, tid, value (pid -> pid in Players, tid -> tid in Teams )
团队:tid、tname、tcolor、tbudget
Wins : wtid, ltid, season, wcore, lscore ( wtid,ltid -> tid in Teams )
问题是Find the name of the players whose played in atleast 2 dif. teams with same color
我所做的是
SELECT DISTINCT P.pname
FROM Players P
,Teams T1
GROUP BY T1.tcolor
HAVING 1 < (
SELECT COUNT (10)
FROM Teams T2
WHERE T1.tcolor=T2.tcolor)
当我尝试查询这个时,我得到一个错误:
Error Code: 1630
FUNCTION PRALATEST.COUNT does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
我在哪一部分做错了?