psf/black">black package</a> for the Python language, which was also an inspiration for the development of this package for SQL.</p>
<p>We can summarize the main steps of the formatter as follows:</p>
<ol>
<li>Each query is separated from above by two newlines.</li>
<li>Everything but <strong>main statements* / clauses</strong> is lowercased</li>
</ol>
<p>* Main statements:</p>
<ul>
<li>CREATE ... TABLE / VIEW table_name AS</li>
<li>SELECT (DISTINCT)</li>
<li>FROM</li>
<li>(LEFT / INNER / RIGHT / OUTER) JOI