What are all the documents?
select * from documents
What are the total access counts of documents in terms of document type?
select sum(access_count) from documents group by document_type_code
Which is the largest among them?
select sum(access_count) from documents group by document_type_code order by count(*) desc limit 1