Question · SQL and MySQL course · Module 10: Transactions and advanced SQL

The ROW_NUMBER function

What is the ROW_NUMBER() OVER (ORDER BY ...) window function used for?

Answer options

  • It removes duplicate rows from the query result
  • It sums values in one column and returns a single row
  • It assigns each row a sequential number according to the given ordering
  • It creates a new table in the database

You can check the correct answer by solving this task in the CodeWorlds game.