一个sql语句中用多个where

时间:2020-04-10 10:29:20   收藏:0   阅读:105

 

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

 

原文:https://www.cnblogs.com/zealousness/p/12671690.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!