Try this query it should be helpful

Code:
SELECT * FROM STORES
WHERE ROWID IN
(
	SELECT MAX(ROWID) OVER(PARTITION BY STORE, CATEGORY)
	FROM STORES
)