WITH for Readable Queries
A WITH clause names a step of the query.
Example
WITH good AS (SELECT * FROM students WHERE score >= 80)
SELECT country, COUNT(*) AS n FROM good GROUP BY country;Result
country | n Nigeria | 3
Exercise
Name a step.
x AS (SELECT 1) SELECT * FROM xQuiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.