0
使用多組我有2個查詢來獲得具有計數= 1家庭和計數= 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;
,但我需要這些查詢合併成單一query.Like
count1 count2
nooffamiliesHavingcount = 1 nooffamiliesHavingcount = 2
請幫我....預先感謝..
can i在這裏指定條件。那就是在IN – PSR 2013-04-04 10:06:24
這裏例如我指定了1和2. – PSR 2013-04-04 10:09:01
但我有像<=1 , > = 2和<= 10的條件,高於10。 – PSR 2013-04-04 10:10:04