SQL

Apply consistent casing, indentation, and line breaks to tangled SQL queries so you can quickly grasp logic, joins, and subqueries.

Language
Indentation
Keyword Casing
Identifier Casing
Separate queries with semicolons.

Input SQL

Output SQL