Skip to content

Instantly share code, notes, and snippets.

@doryokujin
Created October 31, 2016 04:15
Show Gist options
  • Save doryokujin/7c38580b54d4b886849fdb433eee8bda to your computer and use it in GitHub Desktop.
Save doryokujin/7c38580b54d4b886849fdb433eee8bda to your computer and use it in GitHub Desktop.
SELECT
TD_TIME_FORMAT(time,'yyyy-MM-dd') AS d,
COUNT(1) AS pv,
COUNT(DISTINCT td_client_id) AS uu
FROM
pageviews
GROUP BY
TD_TIME_FORMAT(time,'yyyy-MM-dd')
ORDER BY
d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment