Skip to content

Instantly share code, notes, and snippets.

@eberloso
eberloso / delete_workflows_duplicats.sql
Last active March 4, 2026 07:18
Consultar i eliminar workflows duplicats
delete from wkf_workitem where id in (select min(wkd.id) from wkf_workitem wkd where wkd.inst_id in (select
inst_id
from
wkf_workitem wki
JOIN wkf_instance ins ON ins.id = wki.inst_id
group by
inst_id, ins.res_id, ins.res_type, ins.uid
having
count(*) > 1