这个语句有啥问题?提示GROUP附件有语法错误
SELECT a.品号 AS ph, a.对方中心 AS dfzx, a.减少数量 AS sl, b.bzsl AS bzslFROM (SELECT 对方中心, 品号, SUM(减少数量) AS 减少数量
FROM 减少数量表
WHERE 中心名称 = '铸造' AND 对方中心 <> '品号改动' AND 倒算 = 0
GROUP BY 对方中心, 品号) AS a LEFT JOIN
(SELECT 品号, SUM(sl) AS bzsl
FROM (SELECT 品号, 减少数量 AS sl
FROM 减少数量表
WHERE 中心名称 = '铸造' AND 对方中心 <> '品号改动' AND 倒算 = 0
UNION
SELECT 品号, 结余数量 AS sl
FROM 结余数量表
WHERE 年份 = 2008 AND 月份 = 4 AND 中心名称 = '铸造')
GROUP BY 品号) AS b ON a.品号 = b.品号