Question: Show all document ids and the number of paragraphs in each document. Order by document id.
Schema: create table paragraphs (document_id varchar, PRIMARY KEY (document_id))
SQL: select document_id, count(*) from paragraphs group by document_id order by document_id