SQL Tips and Tricks

I’m no expert in SQL, far from it! But there are a few things I’ve learned using SQL most every day over the past five years. Pick a topic below: maybe I can save you some trouble in your day-to-day!

Is there something you’ve learned about SQL that you’d like to share? Send it my way at nat[AT]datadennett.net

Booleans in SQL

Advanced Filtering In SQL

Intermediate Unions in SQL

Updating Data Models Directly

Open Questions

Do you know more about these topics? Please reach out!

Why do some models need to be encased in CTEs?

I’ve noticed that in some especially complex models, with lots of calculations being done at the same time, especially ones that rely on each other, some calculated fields won’t populate unless they get migrated to their own CTE. Not sure why that is!

Notes mentioning this note


Here are all the notes in this garden, along with their links, visualized as a graph.