I have this DB design (ProductCategories is a join table):
I need to query sold products, filter them by date, group by product ID and find all categories for tha