Show the project ids for documents.
select project_id from documents
For each of them, also show the number of documents.
select project_id, count(*) from documents group by project_id
Which of them have at least 2 documents?
select project_id from documents group by project_id having count(*) >= 2