Created
September 24, 2016 17:56
-
-
Save firstfu/a163e27ad15b6c61542fa9c958b36b05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##GroupBy | |
SELECT sup_id, SUM(price), avg(price) FROM coffees GROUP BY sup_id | |
##聚合函數後可加別名Alias(須空隔) | |
SELECT AVG(total) 平均 , SUM(total) 總和, COUNT(*), MAX(price) 最大價格, MIN(price) 最小價格 FROM coffees |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment