Loading content...
Format messy SQL into readable, indented queries with configurable options. Supports SELECT, INSERT, UPDATE, DELETE, DDL and more.
SELECT c.name, count(p.id) AS product_count, avg(p.price) avg_price FROM categories c LEFT JOIN ( SELECT p. *, pc.category_id FROM products p INNER JOIN product_categories pc ON pc.product_id = p.id WHERE p.active = 1 ) p ON p.category_id = c.id WHERE c.parent_id is NULL GROUP BY c.id, c.name HAVING count(p.id) >0 ORDER BY product_count DESC, c.name ASC LIMIT 10 OFFSET 5
Get the formatting conventions and index patterns we use to keep even 200-line queries readable.
No spam. Unsubscribe anytime.
Discover more utility-driven tools designed to enhance your workflow and technical excellence.
Test JavaScript regular expressions with live match highlighting, capture groups, and a plain-English breakdown of every token.
Build and decode cron schedules visually. Get the next 5 run times, a human-readable description, and copy-ready syntax.
Beautify, minify, sort keys, and validate JSON instantly. Side-by-side diff mode for comparing two payloads.