課程
/數(shù)據(jù)庫
/MySQL
/數(shù)據(jù)庫設(shè)計那些事
其實一直都不太懂group by 有什么作用,這里如果不寫group by會怎么樣
2016-08-04
源自:數(shù)據(jù)庫設(shè)計那些事 3-8
正在回答
在我看來就是以某個字段當(dāng)作一個組展示出來,我還是覺得用order by 比較好。
用來 對記錄進行分組,常用分組匯總,如select id,sum(t.quantity) from table1 as t group by id
greenhandc 提問者
舉報
本教程從數(shù)據(jù)庫設(shè)計基本理論入手,教你設(shè)計簡潔高效數(shù)據(jù)庫結(jié)構(gòu)
1 回答關(guān)于數(shù)據(jù)庫搜索
1 回答關(guān)于反范式化設(shè)計
2 回答關(guān)于有標(biāo)簽表的設(shè)計
1 回答關(guān)于生日字符類型選擇的先后
1 回答關(guān)于數(shù)據(jù)庫系統(tǒng)的編制語言的系統(tǒng)問題
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-01-17
在我看來就是以某個字段當(dāng)作一個組展示出來,我還是覺得用order by 比較好。
2016-08-05
用來 對記錄進行分組,常用分組匯總,如select id,sum(t.quantity) from table1 as t group by id