I'm working with SQLite and currently attempting to delete certain duplicate rows from a certain user (with ID 12345). I've managed to identify all of the rows I wish to delete, but I'm now unsure how to go about deleting these rows. This is my SELECT query:
SELECT t.*
from (select t.*, count(*) over (partition by code, version)
as cnt from t) t
where cnt >= 2 and userID = "12345";
How would I go about deleting the rows matching this result? Can I use the query above in some way to identify which rows I want to delete? Thanks in advance!