For further actions, you may consider blocking this person and/or reporting abuse
Speedy emails, satisfied customers
Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.
Read next
🚀⚙️ JavaScript Visualized: the JavaScript Engine
Hanzla Baig -

What was your win this week?!
Jess Lee -

A Quick Review of SQL Window Functions with Examples
Luca Liu -

The Fall of a Community
MilesWK -
Top comments (14)
1) code layout: SELECT, FROM, WHERE un-tabbed. JOIN indent 1 tab. Fields and tables indent 5 or 6 tabs. AND/OR in WHERE clause indent one less than conditions. If you have complex nested conditions use brackets and indentation to make it clear.
2) SARGable conditions (Google them)
3) no nested selects, lift them out to be CTEs. It makes them easier to test and keeps your main code cleaner because you can give the CTE a decent name when you include it in the main query.
4) don't use CURSOR unless you absolutely have to. Most instances could be replaced by PIVOT/UNPIVOT or STUFF...FOR XML
Hey Aaron, would you happen to have a visual example of your first point?
`
Cool, that's very easy to read! Thanks
Don't use SELECT * from TABLE;
because....?
Because * will return every single column , when you only need 1-2 column
you are right, but that is not why you shouldn't use * in a production query. Not specifying the columns requires a round trip to the sys schema to get a list of columns so it is fractionally slower but more importantly if you are using it in a view and the structure of the underlying table changes the new columns will NOT be reflected in the view until you recompile it using an ALTER VIEW command and this can be very confusing. When you do recomile it then the ordinal position of subsequent columns in the view will be shifted, or you may end up with naming conflicts which are hidden in the original query by not listing the field names explicitly.
In a similar vein make sure you use column names
rather than ordinal positions
as the column order COULD change, especially if you are referencing a VIEW rather than a TABLE not to mention that it is significantly easier to read with column names
wow , You explained everything😲
Accuracy Rules
Performance Rules
Create Proper Indexes
Use a good CLI tool like Pgcli and a GUI like Valentina Db.
Bulk update/insert 👌
Tentei aprender SQL, consegui travar o note mas não consegui instalar a senha mestra, agora vou tentar aprender de novo.
SQL Tips & Tricks: Counting Rows
Jimmy Guerrero for YugabyteDB ・ Aug 27 '20