What are all the documents?
select * from documents
Which document types are there?
select document_type_code from documents group by document_type_code
Which types have more than 4 documents?
select document_type_code from documents group by document_type_code having count(*) > 4