Skip to content

Instantly share code, notes, and snippets.

@nchapman
Created April 1, 2010 18:29
Show Gist options
  • Save nchapman/352190 to your computer and use it in GitHub Desktop.
Save nchapman/352190 to your computer and use it in GitHub Desktop.
SELECT HOUR(CONVERT_TZ(created_at, '+00:00','-07:00')) AS hour, COUNT(DISTINCT uuid) as count FROM hits WHERE DATE(created_at) = DATE(NOW()) GROUP BY HOUR(created_at);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment