One-line SELECT
- SQL query
- select a, b from t where x = 1 and y = 2
- Keyword case
- UPPERCASE
- Indent
- 2 spaces
Result Formatted SQL: SELECT
a,
b
FROM
t
WHERE
x = 1
AND y = 2
Statements: 1
Lines: 8
Keywords: 4
Tokens: 14
- Split the input into 14 tokens; strings, quoted names and comments stay intact.
- Placed each clause keyword on its own line and indented its contents with 2 spaces.
- Broke top-level commas and AND / OR conditions onto new lines; 1 statement(s), 8 lines.
Each clause gets its own line, each selected column sits on its own indented line, and the second condition starts with AND.