我有 2 个查询来获取 count = 1 和 count = 2 的家庭数。
SELECT Name, count(*) as c FROM Tablename GROUP BY HOUSE_NO HAVING c<=1;
SELECT Name, count(*) as c FROM Tablename GROUP BY HOUSE_NO HAVING c>=2 and c<=4;
但我需要将这些查询组合成单个查询。就像
count1 count2
nooffamiliesHavingcount = 1 nooffamiliesHavingcount = 2
请帮助我..提前谢谢..