What does PERCENT_RANK() return for the first row in a partition ordered by salary?

SQL Data Analyst Medium

SQL Data Analyst — Medium

What does PERCENT_RANK() return for the first row in a partition ordered by salary?

Key points

  • The function PERCENT_RANK() calculates the relative rank of a row within a group.
  • The rank is expressed as a percentage value between 0.0 and 1.0.
  • The first row in a partition ordered by salary will have a PERCENT_RANK() of 0.0.

Ready to go further?

Related questions