Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WITH temple AS (SELECT user_id,
- COUNT (id) AS total
- FROM stackoverflow.badges
- WHERE creation_date::date BETWEEN '2008-11-15' AND '2008-12-16'
- GROUP BY user_id)
- SELECT DISTINCT user_id,
- total,
- RANK() OVER (ORDER BY total)
- FROM temple
- ORDER BY total DESC, user_id ASC
- LIMIT 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement