-- Determine the identifiers of purchases performed in Brabant on the last day present in the database.

SELECT Purchases.id AS ids
FROM Purchases
JOIN province ON province.ROWID = Purchases.province
WHERE time > date((SELECT MAX(time) FROM Purchases),'-1 days') AND province.name = 'Brabant'
;
