title: Suggested format for SQL statement
body: <p>I've always struggled with how to format SQL queries in terms of whitespace, alignment, etc. It seems whenever there is an &quot;auto-formatter&quot; it seems to format things differently than the next one, whether it is within a SQL client or a website or text-editor that does various language formatting. Are there any guideline(s) for how SQL should be formatted for best readability? Here is an example of how I currently do it:</p>
  <pre><code>SELECT
      name
  FROM 
      sales_instance si 
      JOIN main_iteminstance i ON si.instance_id=i.id
  ORDER BY
      name
  </code></pre>
  <p>Also, yes I know this may be 'opinion-based' and people may want to close it for that, but I think this answer is helpful as to writing clean SQL and hopefully someone can provide a good summary of the available formats or guidelines.</p>