Question: Find the list of documents that are both in the most three popular type and have the most three popular structure.
Schema: create table documents (document_name varchar, document_type_code varchar, document_structure_code varchar, PRIMARY KEY (document_name))
SQL: select document_name from documents group by document_type_code order by count(*) desc limit 3 intersect select document_name from documents group by document_structure_code order by count(*) desc limit 3