Skip to content

Joins with grouping · ⁨连接与分组⁩

English

Reports: joins with grouping

The real power comes from combining what you have learned: join two tables, group the joined rows, and summarise each group with an aggregate.

A common report is "how much has each customer spent?" — join customers to their orders, group by customer, and SUM the totals.

中文

报表:连接加分组

真正的威力来自把你学过的东西组合起来:连接两张表,把连接后的行分组,再用聚合函数为每组做汇总。

一个常见的报表是“每位顾客花了多少钱?”—— 把顾客连接到他们的订单,按顾客分组,再 SUM 出金额。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩