I hate you and and the awful layout you have just introduced me to... Also, that is how I will be formatting all my SQL from now on.
SELECT
a, b, COUNT(*) as count
FROM
table
WHERE
cond1 AND cond2
GROUP BY
a, b
ORDER BY
count DESC - why capitalize KEYWORDS. We're no longer in 1970s. We use colors
- why waste so much space. Why not just put table on the same line with from. With joins this just bloats up
- for complicated conditions they have to be put on their own lines. Do I give each AND a separate line and waste ever more space?- Space is not wasted when it it makes code more readable.
- Yes, and also give the columns in select their own lines. So nice to read. Space well spend!
For heavy SQL codebases found in data analytics, there are better styles.