CREATE TABLE Templates (template_type_code VARCHAR, Template_ID VARCHAR); CREATE TABLE Documents (template_ID VARCHAR); CREATE TABLE Ref_template_types (template_type_description VARCHAR, template_type_code VARCHAR)
What are the distinct template type descriptions for the templates ever used by any document?
SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID