Loading…
Time is the most common dimension in analytics:
In SQLite, use strftime() to extract parts of a date:
strftime('%Y', date) -- Year: '2026'
strftime('%m', date) -- Month: '01'
strftime('%w', date) -- Day of week: '0' (Sunday) to '6'
strftime('%Y-%m', date) -- Year-Month: '2026-01'
SELECT strftime('%Y-%m', date) as month,
SUM(total_revenue) as revenue
FROM daily_stats
GROUP BY month
ORDER BY month;
Analyze daily_stats by day of the week:
Downloading SQL engine… (one-time)
This runs entirely in your browser and is cached for next time.