|
@RhodiumToad | |||||
|
SQL style tip: treat "SELECT DISTINCT" as one keyword that happens to have a space in it.
Never put a newline before DISTINCT, and never put an open paren directly after it. When using COUNT(DISTINCT ...), if you absolutely need a paren, then always have a space before it.
|
||||||
|
||||||
|
Christian Kruse
@cjk101010
|
26. lis |
|
Exception: SELECT DISTINCT ON… 😉
|
||
|
|
||
|
RhodiumToad
@RhodiumToad
|
26. lis |
|
Not an exception. Still best to treat "SELECT DISTINCT ON (list)" as being a single keyword. (Or better yet, avoid using it entirely.)
|
||
|
|
||
|
Lukas Eder
@lukaseder
|
27. lis |
|
You talk about formatting. I've spent so much time explaining to people that semantically, they are quite... distinct.
|
||
|
|
||