SQL語(yǔ)句寫了一半就不知道怎么寫了,我是這樣寫的,先按鄉(xiāng)鎮(zhèn)分組select?鄉(xiāng)鎮(zhèn),???? AS '戶數(shù)',count(*) AS '各鄉(xiāng)鎮(zhèn)的人數(shù)'from personl group by 鄉(xiāng)鎮(zhèn)打?的地方,不知道怎么寫才能寫出來計(jì)算戶數(shù),是按戶編號(hào)再次分組,這個(gè)我就寫不出來了,不怎么二次分組是怎么分組的
用SQL語(yǔ)句查詢?cè)谌藛T花名冊(cè)中按鄉(xiāng)鎮(zhèn)分組后統(tǒng)計(jì)各鄉(xiāng)鎮(zhèn)的戶數(shù)
joyoes
2017-06-30 15:04:36