Code Room
Code reviewMedium
Question
Review this SQL query that powers a daily-signups report over a 40M-row table.
There is a btree index on `users(created_at)` and one on `users(email)`.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
SELECT user_id, emailFROM usersWHERE DATE(created_at) = '2026-06-20' AND LOWER(email) LIKE '%@acme.com'ORDER BY created_at DESC;Run or narrate your approach, then ask the coach.