CREATE TABLE documents (access_count NUMBER, document_type_code VARCHAR2)

Find the total access count of all documents in the most popular document type.
SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1
SELECT SUM("access_count") FROM "documents" GROUP BY "document_type_code" ORDER BY COUNT(*) DESC FETCH FIRST 1 ROWS ONLY