What are the ids of documents with the letter 's' in the name with any expense budgets?
select t1.document_id from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t1.document_name like '%s%'
What are the document type codes of documents with the letter 's' in the name with any expense budgets?
select t1.document_type_code from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t1.document_name like '%s%'
What are the project id of documents with the letter 's' in the name with any expense budgets?
select t1.project_id from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t1.document_name like '%s%'
What are the ids of documents with the letter 'a' in the name with any expense budgets?
select t1.document_id from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t1.document_name like '%a%'