我想要总和值的总和,下面的查询给出(7月+ 8月+ 9月)总和
SELECT `ls_no`,
`core`,
`domain`,
`Prog_StdName`,
sum(Jul+Aug+Sep) as total
FROM `cf_1ls`
WHERE `ls_no`='1234'
AND `SOF`='1001'
GROUP BY domain ORDER BY `id`;
现在我需要查询来获得总和的总和
答案 0 :(得分:1)
如果您想要总和,可以省略group by
。
SELECT sum(Jul+Aug+Sep) as total
FROM cf_1ls
WHERE ls_no='1234'
AND SOF='1001'