Skip to content

Instantly share code, notes, and snippets.

@bcambel
Created November 22, 2015 19:09
Show Gist options
  • Select an option

  • Save bcambel/40afa5bec5db013afd75 to your computer and use it in GitHub Desktop.

Select an option

Save bcambel/40afa5bec5db013afd75 to your computer and use it in GitHub Desktop.
INSERT INTO events_2015_09_17
SELECT count(id) as pv, evt_name, hour, device_type, browser, os, domain, path, utm_source,
utm_medium, utm_campaign, utm_content, utm_term, country
FROM events where day='2015-09-17' and evt_name='pv'
group by 2,3,4,5,6,7,8,9,10,11,12,13,14
order by count(id) desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment