Show ids for all templates not used by any document.
create table documents (template_id varchar, PRIMARY KEY (template_id)); create table templates (template_id varchar, PRIMARY KEY (template_id))
select template_id from templates except select template_id from documents