nyazoom/queries/records/delete_expired_records.sql

5 lines
129 B
SQL

DELETE FROM records
WHERE
downloads >= max_downloads
OR julianday('now') - julianday(uploaded) > 3
RETURNING cache_name;