Untitled

From Harmless Crocodile, 10 Months ago, written in SQL, viewed 184 times.
URL http://codebin.org/view/f13eb5ab Embed
Download Paste or View Raw
  1. WITH
  2. s AS (SELECT *,
  3.              NTILE(5) OVER (ORDER BY created_at DESC) AS r
  4.       FROM tools_shop.users)
  5. SELECT user_id,
  6.        created_at,
  7.        r
  8. FROM s

Reply to "Untitled"

Here you can reply to the paste above