Online SQL Formatter is a useful tool that allows you to edit, view, and analyze SQL data, as well as beautify and format it. With this tool, you can easily edit your SQL code and share it with others in a simple and straightforward manner.
Online SQL Beautifier - SQL Formatter Example
Before
SELECT customer_name, COUNT(order_id) AS num_orders FROM orders JOIN customers ON orders.customer_id = customers.customer_id WHERE order_date >= '2022-01-01' GROUP BY customer_name HAVING num_orders > 5 ORDER BY num_orders DESC;
After
SELECT
customer_name,
COUNT(order_id) AS num_orders
FROM
orders
JOIN customers ON orders.customer_id = customers.customer_id
WHERE
order_date >= '2022-01-01'
GROUP BY
customer_name
HAVING
num_orders > 5
ORDER BY
num_orders DESC;