What does the NTILE(4) OVER (ORDER BY score DESC) assign to a row ranked 3rd out of 20?

SQL Data Analyst Medium

SQL Data Analyst — Medium

What does the NTILE(4) OVER (ORDER BY score DESC) assign to a row ranked 3rd out of 20?

Key points

  • NTILE(4) divides data into 4 equal parts
  • Top quartile includes positions 1-5 out of 20
  • The row's rank determines which quartile it falls into

Ready to go further?

Related questions