← Back to naviwork.tools
SQL Formatter & Beautifier
Format
Minify
UPPERCASE Keywords
lowercase keywords
Copy Output
Clear
Indent:
2 spaces
4 spaces
Tab
Input SQL
SELECT u.id, u.name, u.email, COUNT(o.id) AS order_count, SUM(o.total) AS total_spent FROM users u INNER JOIN orders o ON u.id = o.user_id WHERE u.created_at > '2024-01-01' AND o.status = 'completed' GROUP BY u.id, u.name, u.email HAVING COUNT(o.id) > 5 ORDER BY total_spent DESC LIMIT 100;
Formatted Output
Copied!