select county, count(county) as total_entry from house
group by county;
我明白了
county   | total_entry
'county1'| '1'
'county2'| '11'
'county3'| '2'
现在我想得到以下结果:
county   | ad_type     | total_entries 
'county1'| SALE        | '1'      
'county2'| SALE        | '4'      
'county2'| RENT        | '5'      
'county2'| NEWHOUSING  | '2'      
'county3'| RENT        | '2'        
我该如何做到这一点?(ad_type 是 house 表中的一个字段)。