Guest User

Untitled

a guest
Feb 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. -- most active questions in the last 7 days
  2. 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
Add Comment
Please, Sign In to add comment