读书人

求一条简单sql大家帮小弟我写下

发布时间: 2013-07-08 14:13:00 作者: rapoo

求一条简单sql,大家帮我写下。
分组统计,a列大于10,b列大于20,c列大于30的数据。

谢谢。 分组统计
[解决办法]
select
count(case when a>10 then 1 else null end),
count(case when b>20 then 1 else null end),
count(case when c>30 then 1 else null end)
from 表

读书人网 >SQL Server

热点推荐