Skip to content
OmniTool
⌘K
History
⌨
SQL Formatter
SQL Input
SELECT u.id, u.name, u.email, count(o.id) as order_count from users u left join orders o on u.id = o.user_id where u.active = 1 and o.created_at >= '2024-01-01' group by u.id, u.name, u.email having count(o.id) > 5 order by order_count desc limit 20
249 characters
Format
Formatted SQL