MySQL表名称:学生字段: id,name,subject1,subject2,subject3。
需要过滤掉总分超过150分的学生。
发布于 2017-08-08 02:07:31
使用以下查询:
SELECT id, (SUM(subject1)+SUM(subject2)+SUM(subject3)) AS total FROM student GROUP BY id您可以在mysql查询中检查if(total > 150)。
https://stackoverflow.com/questions/45553093
复制相似问题