Skip to content

Instantly share code, notes, and snippets.

@xdite
Created August 21, 2008 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xdite/6487 to your computer and use it in GitHub Desktop.
Save xdite/6487 to your computer and use it in GitHub Desktop.
SELECT count(id) as hits,
LEFT(created_at,10) as created_on,
event_id FROM `visits` WHERE (left(created_at,10) = '2008-08-20' and type = 'EventVisit') AND ( (`visits`.`type` = 'EventVisit' ) ) GROUP BY created_on, event_id ORDER BY created_on DESC, event_id ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment