Ignore au PAY when figuring out caster's last appearance

This commit is contained in:
gg1234 2024-04-16 18:09:57 -07:00
parent 60ef78df99
commit 82ff0f95f3
1 changed files with 2 additions and 1 deletions

View File

@ -214,13 +214,14 @@ SELECT DATE(jst) AS dt,
HAVING c > 1
ORDER BY dt DESC;
-- Caster's Last Appearance
-- Caster's Last Appearance (ignoring au PAY)
SELECT c.n AS name,
JULIANDAY(DATETIME('now', '+09:00')) - JULIANDAY(MAX(s.jst)) AS days_since,
MAX(s.jst) AS last_appearance
FROM schedule s
JOIN caster c ON c.id = s.caster_id
WHERE s.jst < REPLACE(DATETIME('now', '+09:00'), ' ', 'T')
AND s.segment_id != 8
GROUP BY c.n
ORDER BY last_appearance DESC;