Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analytics Toolkit

Production SQL patterns for marketing and revenue analytics. Built for Snowflake with dbt-compatible syntax.

Contents

File Description
campaign_performance.sql ROAS, CPM, CTR, and CPA by campaign
top_n_per_group.sql Top N results per partition using ROW_NUMBER
budget_pacing.sql Flag campaigns behind pace vs. expected spend
wow_change.sql Week-over-week metric change using LAG

Stack

  • Warehouse: Snowflake
  • Transformation: dbt
  • Use case: Marketing analytics, revenue reporting, campaign performance

Notes

All queries use NULLIF to prevent division by zero. Window function filtering uses Snowflake's QUALIFY clause where applicable.

About

Production SQL patterns for marketing and revenue analytics — Snowflake, dbt

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors