UK [ɡru:p bai] US [ɡrup ba?]

[Calculation][WIN]Group basis

mysql GROUP BY statement syntax

Function: Used to combine the total function to group the result set according to one or more columns.

Syntax: SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name

mysql GROUP BY statement example

//查找每個客戶的總金額(總訂單)。
SELECT Customer,SUM(OrderPrice) FROM Orders GROUP BY Customer;