diff --git a/tutor/database.py b/tutor/database.py index 81c72c4..41d60a1 100644 --- a/tutor/database.py +++ b/tutor/database.py @@ -373,6 +373,8 @@ async def collection_stats(db: psycopg.Cursor) -> dict: FROM "copies" JOIN "cards" USING ("scryfall_id") LEFT JOIN "card_prices" USING ("scryfall_id") + WHERE "card_prices"."date" = + (SELECT "value" FROM "vars" where "key" = 'last_update') """ ) return await db.fetchone()