How to calculate YTD, QTD and MTD in Snowflake
Year-, quarter- and month-to-date totals from one query, with a date range that also works on timestamps.
312 short references on SQL, Snowflake, Tableau, AWS and Python, written while solving real problems. Search them, or browse by topic.
Year-, quarter- and month-to-date totals from one query, with a date range that also works on timestamps.
Template and Python versions that work in Airflow 3, where yesterday_ds no longer exists.
A lookup table of the imports that moved in Airflow 3, which old paths still work, and how to fix the rest with ruff.
Data warehouse
SQL patterns, warehouses, stored procedures and account usage queries.
46 guides
Orchestration
Scheduling, task logic, alerts, dbt and setup recipes for Airflow 3.
23 guides
Transformation
Commands, models, tests, Jinja and Snowflake recipes for dbt Core 1.x.
30 guides
Analytics platform
Jobs, CI, the platform CLI and the Semantic Layer on dbt Cloud, now called dbt platform.
13 guides
Metrics
Semantic models, metrics, time comparisons, queries and integrations with MetricFlow and the latest YAML spec.
37 guides
Business intelligence
Date calculations and Python scripting with TabPy.
18 guides
Business intelligence
Date, logic, table, level-aware and period-to-date calculations in QuickSight, now called Amazon Quick Sight.
41 guides
Cloud / NoSQL
Create, query and maintain DynamoDB tables from Python with boto3.
15 guides
Geodata
Extract points of interest with Overpass QL queries.
5 guidesEarlier notes on tools I have worked with, kept online because people still use them.
Database
Data science
LLMs
Database
Automation
Developer tools
Business intelligence
Business
Business models, process improvement and Excel. Earlier articles in Italian.