In TD the the select clause uses a ROW_NUMBER function differently from Vertica
The ROW_NUMBER function assigns a unique number to the rows starting from 1 with thewindows partition clause
The TD way to write this function
Code: Select all
sel a.pm_id, a.pm_name
from loc_table a qualify row_number() over(partition by pm_id
order by pm_name asc) =1
Can anybody explain what the above query does and how can we achieve the same in Vertica.