Format and beautify SQL queries online — all dialects
SELECT u.id, u.name, COUNT(o.id) AS order_count, SUM(o.total) AS total_spent FROM users u LEFT JOIN orders o ON u.id = o.user_id WHERE u.created_at > '2024-01-01' AND u.status = 'active' GROUP BY u.id, u.name HAVING COUNT(o.id) > 0 ORDER BY total_spent DESC LIMIT 50;
Format and beautify SQL queries online. Supports MySQL, PostgreSQL, SQLite, MS SQL Server, Oracle. Keyword highlighting and indentation.
MySQL, PostgreSQL, SQLite, MS SQL Server, Oracle, and standard SQL.