db.l3.ai

Play

lessons

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

WITH

WITH names a subquery so you can read the query top to bottom.

task

Rewrite a nested query as two steps: first the total of each order (unit_cents * qty summed), then the ids of orders whose total is above 10 times the average order total.

hints