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
What are the names of documents that have both one of the three most common types and one of three most common structures?
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
select document_name from documents group by document_type_code order by count ( * ) desc limit value intersect select document_name from documents group by document_structure_code order by count ( * ) desc limit value
What are the names of documents that have both one of the three most common types and one of three most common structures ?