From Queen Capybara, 5 Months ago, written in Plain Text, viewed 59 times.
URL http://codebin.org/view/1a380566 Embed
Download Paste or View Raw
  1. WITH top_user as
  2.     (SELECT user_id
  3.     FROM stackoverflow.posts
  4.     GROUP BY user_id
  5.     ORDER BY COUNT(distinct id) DESC
  6.     LIMIT 1)
  7. SELECT EXTRACT(WEEK FROM creation_date) as week, MAX(creation_date)
  8. FROM top_user tp
  9. JOIN stackoverflow.posts p ON tp.user_id=p.user_id
  10. WHERE creation_date::date BETWEEN '2008-10-01' AND '2008-10-31'
  11. GROUP BY EXTRACT(WEEK FROM creation_date)

Reply to "Untitled"

Here you can reply to the paste above