CREATE TABLE ref_budget_codes (budget_type_code CLOB, budget_type_description CLOB)
CREATE TABLE accounts (account_id NUMBER, statement_id NUMBER, account_details CLOB)
CREATE TABLE ref_document_types (document_type_code CLOB, document_type_name CLOB, document_type_description CLOB)
CREATE TABLE projects (project_id NUMBER, project_details CLOB)
CREATE TABLE statements (statement_id NUMBER, statement_details CLOB)
CREATE TABLE documents_with_expenses (document_id NUMBER, budget_type_code CLOB, document_details CLOB)
CREATE TABLE documents (document_id NUMBER, document_type_code CLOB, project_id NUMBER, document_date TIME, document_name CLOB, document_description CLOB, other_details CLOB)

Give the ids of documents with expenses that have the budget code 'SF'.
SELECT document_id FROM documents_with_expenses WHERE budget_type_code = 'SF'
SELECT "document_id" FROM "documents_with_expenses" WHERE "budget_type_code" = 'SF'