In my activity_logs
, it contains columns: material_name
, user_id
, mod_result
(this marks a test if Pass/Fail), cert_links
. Somehow the users generate twice the entry of the material_name
with the cert_links
column left blank.
I can list duplicates to all user_id
with:
SELECT user_id, material_name, mod_score, cert_links, start_time
FROM activity_logs
WHERE mod_result = 'Pass' AND cert_links = ''
I want to delete the duplicate entries that has mod_result = 'Fail'
and cert_links = ''