mobile typing isn't scored — practice only
WITH active_users AS (
SQL · general · type the snippet below to practice
def fib(n):
a, b = 0, 1
for _ in range(n):
a, b = b, a + b
return a
about this snippet
This is the cte snippet in SQL — 10 lines of real SQL code that exercises common patterns you'll see in production. DeveloperType scores you on net WPM and accuracy and only counts runs above 95% accuracy on the leaderboard, so practice rewards precision, not speed alone.
view source (10 lines)
WITH active_users AS (
SELECT id, email
FROM users
WHERE last_seen > NOW() - INTERVAL '30 days'
)
SELECT a.email, COUNT(o.id) AS orders
FROM active_users a
LEFT JOIN orders o ON o.user_id = a.id
GROUP BY a.email;
more SQL snippets:
browse all SQL snippets →