0 - 1 of 1 tags for qualify 3706 error upgrade

Can anyone please help me with this error. This code has worked fine for over a year then we upgraded teradata and now it no longer works (no other changes). Im new to Teradata so any help would be much appreciated

Qualify Row_Number() Over (Partition by URN Order by hierarchy asc) = 1;