Without incorporating additional meta-data about the purchases onto the customer table the most basic solution would be:
SELECT DISTINCT customer_id FROM products WHERE date > (now() - '12 months'::interval) EXCEPT SELECT DISTINCT customer_id FROM products WHERE date <= (now() - '12 months'::interval)
---
Another solution: WHERE ... >12 AND NOT EXISTS (SELECT ... WHERE <= 12)
David J.
subsidiary matter: in what circumstances is better to use EXCEPT and in what NOT EXISTS?
are those equivalents? tried to google their comparison, but no relevant results found for PostgreSQL