Writing SQL queries
Understand how to write SQL queries for your dbt models.
Reference a source
Reference a model
Organize your SQL code with CTEs
To improve the readability of your SQL code, consider using Common Table Expressions (CTEs). CTEs are temporary query results that can be re-used within the broader scope of the entire model.
FAQ
What SQL dialect should I use for my models?