Optimization

MIN_BY and MAX_BY in Snowflake

How to use MAX_BY and MIN_BY in Snowflake (and DuckDB, BigQuery, Databricks) to replace messy self-joins and windows when getting latest or top-N values per group.

A Guide to Snowflake's Query Profile

If you've ever written a SQL query, chances are you've encountered a query that had you twiddling your thumbs. Learning how to read Snowflake's Query Profile is