PARTITION BY clause to fetch top N rows per group.
Syntax
ranking_function_clause is:
rank cannot be included in column_list.You must follow the pattern exactly to construct a valid Top-N query.
Example
Create a table
Insert data
Run a top-N query