Show all template type codes with less than three templates.
create table templates (template_type_code varchar, PRIMARY KEY (template_type_code))
select template_type_code from templates group by template_type_code having count(*) < 3