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://*.com/questions/42481826/how-to-use-multiple-where-clause-in-one-sql-query
2024-01-21 10:33:52
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://*.com/questions/42481826/how-to-use-multiple-where-clause-in-one-sql-query
下一篇:如何写jquery插件