What are document types of document with status done?
select document_type_code from documents where document_status_code = "done";
Show me the document id of those whose document status is done and document type is Paper.
select document_id from documents where document_status_code = "done" and document_type_code = "Paper";
Which of those are shipped by agent named USPS?
select document_id from documents where document_status_code = "done" and document_type_code = "Paper" intersect select document_id from documents join ref_shipping_agents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code where ref_shipping_agents.shipping_agent_name = "USPS";