Return rows that meet a condition in two different columns
WITH cte AS ( SELECT *, COUNT(*) OVER (PARTITION BY color, smell)  cnt
              FROM animals )
SELECT name, color, smell
FROM cte
WHERE cnt &gt; 1


PS. color and smell must be NOT NULL.