Byte Utility
Tools
About
bytetechlabs.com
← All tools
SQL Formatter
Format and prettify SQL queries
Dialect
Standard SQL
MySQL
PostgreSQL
SQLite
T-SQL (SQL Server)
PL/SQL (Oracle)
Indent
2 spaces
4 spaces
Uppercase keywords
SQL Input
SELECT u.id, u.name, u.email, 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.active = 1 GROUP BY u.id, u.name, u.email HAVING COUNT(o.id) > 0 ORDER BY total_spent DESC LIMIT 10;
Format SQL