Hi @Andy Soden
However the output still shows URN and Start date grouping where they should be partitioned together as having multiple row numbers.
Row_number
is not an aggregate function; it just gives you the row numbers of different partitions.
I guess you need Count here.
Select URN, StartDate,COUNT(*) AS Iteration
From T
Group by URN, StartDate
Best regards,
Cosmog Hong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.