From a really very nice blog on PostgreSQL, but this topic is applicable in general:
Maintainable queries - my point of view (depesz.com)
...I decided that my priorities for writing maintainable queries:
Avoid useless typing.
Use aliases for tables/views.
Always. And make them sensible
aliases.
Indent code in some way.
Avoid quotations (yes, this is why I
hate Django)
Use join syntax
I do agree with capitalization of reserved words and every other identifier, except my own.