En DISTINCT
bör göra det du letar efter:
SELECT DISTINCT items.ItemName, items.ItemId FROM items
JOIN sales ON items.ItemId = sales.ItemId
WHERE sales.StoreID = ? ORDER BY sales.SaleWeek DESC;
Det skulle bara returnera distinkta items.ItemName, items.ItemId
tupler.