title: Are there any published coding style guidelines for SQL?
body: <p>Often I will end up with very complex SQL statements and I wondered if there was style guideline out there that dictates a common way of laying various aspects of a query out.</p>
  
  <p>I am look for something descriptive along the lines of <a href="http://www.python.org/dev/peps/pep-0008/" rel="noreferrer">Python's PEP8</a> or <a href="http://framework.zend.com/manual/en/coding-standard.html" rel="noreferrer">Zend Frameworks guidelines</a> and not code by example.</p>
  
  <p>Most of my queries are written for MySQL.</p>
  
  <p>So do you know of a universal style guide? Perhaps you have written one yourself. Please share your guidelines.</p>