Here's my specific example of what I mean. I have the following table defined:
CREATE TABLE pets (
id INTEGER UNSIGNED NOT NULL,
name VARCHAR(20) NOT NULL,
breed VARCHAR(20) NOT NULL,
color VARCHAR(20) NOT NULL,
weight INTEGER UNSIGNED NOT NULL,
PRIMARY KEY (id)
);
How would I write an SQL query to find the breeds that include pets of all the same colors as the colors of cocker spaniels? So if all cocker spaniels in the database are either black or white, I need to find all the distinct breeds with at least 1 black pet and 1 yellow pet. I've been stumped with this one for a while and haven't been able to find a comparable answer online so any help here would be appreciated.