謝晒的PHP網頁設計
聯絡E-mail:
sean0704@gmail.com
Wednesday, February 13, 2013
[MYSQL] 分組 "GROUP BY"
列出不重覆的欄位值
SELECT * FROM mytable GROUP BY kind
搭配SUM()可以計算分組之後的總和
SELECT SUM(money) FROM mytable GROUP BY kind
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment