jblu

jblu / Unmanic database file scripts

Last active 6 months ago

Like 0
delete.sql Raw
1DELETE FROM historictaskprobe
2WHERE EXISTS (
3SELECT 1 FROM historictaskprobe p2
4WHERE historictaskprobe.size = p2.size
5AND historictaskprobe.basename = p2.basename
6AND historictaskprobe.abspath = p2.abspath
7AND historictaskprobe.size = p2.size
8AND historictaskprobe.type = p2.type
9AND historictaskprobe.historictask_id > p2.historictask_id
10);
select.sql Raw
1SELECT * FROM historictaskprobe
2WHERE EXISTS (
3SELECT 1 FROM historictaskprobe p2
4WHERE historictaskprobe.size = p2.size
5AND historictaskprobe.basename = p2.basename
6AND historictaskprobe.abspath = p2.abspath
7AND historictaskprobe.size = p2.size
8AND historictaskprobe.type = p2.type
9AND historictaskprobe.historictask_id > p2.historictask_id
10);