Skip to content

Instantly share code, notes, and snippets.

@burin
Created November 18, 2008 23:03
Show Gist options
  • Save burin/26323 to your computer and use it in GitHub Desktop.
Save burin/26323 to your computer and use it in GitHub Desktop.
-- most active questions in the last 7 days
select q.question, q.created_at as asked_on, count(1) as answers from answers a, questions q where a.question_id=q.id and a.created_at>SUBDATE(CURRENT_DATE(), INTERVAL 7 DAY) group by a.question_id order by answers desc, asked_on desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment