MySQL——group by字句
提問人:劉旭39發(fā)布時(shí)間:2020-10-13
group by字句用于根據(jù)字段進(jìn)行分組
例如:
group by 對符合where條件的數(shù)據(jù)進(jìn)行分組
SELECT 專業(yè)名,COUNT(*) AS '學(xué)生數(shù)'
FROM XS
where 性別=1
GROUP BY 專業(yè)名;
繼續(xù)查找其他問題的答案?
相關(guān)視頻回答
group by字句用于根據(jù)字段進(jìn)行分組
例如:
group by 對符合where條件的數(shù)據(jù)進(jìn)行分組
SELECT 專業(yè)名,COUNT(*) AS '學(xué)生數(shù)'
FROM XS
where 性別=1
GROUP BY 專業(yè)名;
點(diǎn)擊加載更多評(píng)論>>