I have written the following query, i am using greenplum db and dbeaver for implementation.
with cte as
(select
*,
row_number() over(partition by first_name order by roll_num) row_num
from table_name
where roll_num in ('0011'))
delete from cte where row_num>1;
The above query is returning error. Can someone help me here, please!