Question: How many documents are using the template with type code 'PPT'?
Schema: create table templates (template_id varchar, template_type_code varchar, PRIMARY KEY (template_id)); create table documents (template_id varchar, PRIMARY KEY (template_id))
SQL: select count(*) from documents as t1 join templates as t2 on t1.template_id = t2.template_id where t2.template_type_code = 'ppt'