sql合并
如何将下列两个sql 合成一个简单的sql???SELECT DPItemId,COUNT(1) idcount
FROM T
where DPDate<='2016-04-15'
group by DPItemId
having count(1) <=10
) as t
select count(*) from (SELECT DPItemId,COUNT(1) idcount
FROM T2
where DPDate<='2016-04-15'
group by DPItemId
having count(1) >10
and count(1) <=50
) as t