The SQL Pretty-Printer formats SQL source code nicely. Currently, the pretty-printer is oriented towards IBM's SQL dialect DB2. The following example shows an SQL statement before and after pretty-printing:
In this example the main changes to the layout are performed in the WHERE clause. The nesting of subexpressions enclosed in parentheses is represented by indentation. Operators and operands on the same level are aligned one below the other. This applies to list elements as well, e. g. the column names in the ORDER BY clause.