أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
SQL, Oracle, Query, Script
select t1.*
from
(Select
a.name
,a.gender
,a.birth_date
,a.birth_place
,row_number() over (partition by a.name,a.gender, a.birth_date order by a.name) as rnk
from Citizen_data a
) t1
where t1.rnk >1
Let us consider the table name be 'citizen_table' with 'name', 'gender', 'birth_date' and 'birth_place' as column names
The following sql query gets the potential data duplicates
select count(*) as number_of_repeated_rows, name, gender, birth_date, birth_place
from citizen_table
group by name, gender, birth_date, birth_place