Question: List the project details of the project both producing patent and paper as outcomes.
Schema: create table project_outcomes (project_id varchar, outcome_code varchar, PRIMARY KEY (project_id)); create table projects (project_details varchar, project_id varchar, PRIMARY KEY (project_details))
SQL: select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id where t2.outcome_code = 'paper' intersect select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id where t2.outcome_code = 'patent'