How many colors are never used by any product?
create table products (color_code varchar, PRIMARY KEY (color_code)); create table ref_colors (color_code varchar, PRIMARY KEY (color_code))
select count(*) from ref_colors where not color_code in (select color_code from products)