一个sql语句中用多个where
2020-04-10 10:21 ZealouSnesS 阅读(3458) 评论(0) 收藏 举报
select SUM(case when total < 60 then 1 else 0 end) as 'studentMarks1', sum(case when total > 80 then 1 else 0 end) as 'studentMarks2' from School where Id = '8'
参考:https://stackoverflow.com/questions/42481826/how-to-use-multiple-where-clause-in-one-sql-query
浙公网安备 33010602011771号