我正在尝试从MS Access查询棒球数据库,但我的SQL语句一直停留在丢失的运算符上。下面是我传递的SQL查询:
SELECT
Master.nameFirst, Master.nameLast,
Master.nameFirst + ' ' + Master.nameLast as FULLNAME,
(SUM(Batting.H) + SUM(Batting.BB) + SUM(Batting.HBP)) / (SUM(Batting.AB) + SUM(Batting.BB) + SUM(Batting.HBP)) as OBP,
SUM(Batting.H) / (SUM(Batting.H) + SUM(Batting.BB) + SUM(Batting.HBP)) as HitP,
(SUM(Batting.2B) + SUM(Batting.3B) + SUM(Batting.HR)) / SUM(Batting.H) as ExtraP,
SUM(Batting.HR) / (SUM(Batting.2B) + SUM(Batting.3B) + SUM(Batting.HR)) as HRP,
SUM(Batting.3B) / (SUM(Batting.2B) + SUM(Batting.3B)) as TriplePerc,
SUM(Batting.HBP) / (SUM(Batting.BB) + SUM(Batting.HBP)) as HBPP
FROM
Master
INNER JOIN
Batting ON Master.playerID = Batting.playerID
WHERE
(Batting.playerID IN (SELECT playerID
FROM Master
WHERE (nameFirst = 'Ryan' AND nameLast = 'Howard'))
缺少的操作符错误似乎集中在这个单一表达式上:
(SUM(Batting.2B) + SUM(Batting.3B) + SUM(Batting.HR)) / SUM(Batting.H) as ExtraP
但老实说,我没有看到任何错误。我错过了什么?