SQL 道场

SQL WORKBENCH

M3 · 难度 4

CTE:总消费过 200 的客户

Browser Postgres · Judge enabled

Prompt

用 WITH 先算出每位客户的总消费,再选出总消费 > 200 的 customer_id 和 total。

SQL Editor

Write, run, inspect, repeat.