Closed joshmfrankel closed 1 year ago
SELECT DATE_TRUNC('month', started_at) as month, device_type, COUNT(id) as total FROM ahoy_visits WHERE started_at > CURRENT_DATE - INTERVAL '12 months' [[AND device_type <> {{remove_device_type}}]] GROUP BY month, device_type ORDER BY month DESC;