nyazoom/queries/records/get_expired_records.sql

8 lines
165 B
MySQL
Raw Normal View History

2024-11-21 11:06:41 -08:00
SELECT
cache_name,
downloads,
max_downloads,
julianday('now') - julianday(uploaded) AS age
FROM records
WHERE downloads >= max_downloads OR age > 5;