What does `NTH_VALUE(expr, 2)` window function return?

Advanced SQL Developer Medium

Advanced SQL Developer — Medium

What does `NTH_VALUE(expr, 2)` window function return?

Key points

  • NTH_VALUE function retrieves the value from a specific row in the window frame
  • The number inside the function determines which row to retrieve
  • The order of rows is determined by the ORDER BY clause in the window frame

Ready to go further?

Related questions