Skip to content

Instantly share code, notes, and snippets.

@ariejan
Created December 16, 2009 10:00
Show Gist options
  • Save ariejan/257723 to your computer and use it in GitHub Desktop.
Save ariejan/257723 to your computer and use it in GitHub Desktop.
SELECT FROM_UNIXTIME(CEILING(UNIX_TIMESTAMP(created_At)/600)*600) AS timeslice,
COUNT(id) AS count
FROM export_articles
GROUP BY timeslice
ORDER BY timeslice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment