I have a table with information like :
With these 2 columns I need to pull a column like “New Column” which is basically serial numbers of pages for each order.
I tried ROW_NUMBER() OVER(ORDER BY Page) AS NewColumn
But that serialized the whole column and did not consider OrderNumber.
Advertisement
Answer
You miss the partition
OVER(PARTITION BY OrderNumber ORDER BY Page)