nyazoom/queries/records/get_expired_records.sql

7 lines
165 B
SQL

SELECT
cache_name,
downloads,
max_downloads,
julianday('now') - julianday(uploaded) AS age
FROM records
WHERE downloads >= max_downloads OR age > 5;