This project shows how I work with messy, real‑world marketing and analytics data.
The dataset simulates exports from Meta Ads, Google Ads, GA4, and an e‑commerce platform.
The goal is to turn raw, inconsistent inputs into a clean, analysis‑ready model suitable for BI dashboards and performance reporting.
This page gives a clear overview of the problem, the approach, and the results — with optional dropdowns for deeper technical detail.
============================================
-- 2. Rolling 7-day revenue
-- Demonstrates window functions for time-series smoothing.
-- ============================================
SELECT
date(transaction_time) AS date,
SUM(revenue) AS daily_revenue,
SUM(SUM(revenue)) OVER (
ORDER BY date(transaction_time)
ROWS BETWEEN 6 PRECEDING AND CURRENT ROW
) AS rolling_7d_revenue
FROM cleaned_transactions
GROUP BY date
ORDER BY date;