CREATE TABLE stay (stayid NUMBER, patient NUMBER, room NUMBER, staystart TIME, stayend TIME)
CREATE TABLE undergoes (patient NUMBER, procedures NUMBER, stay NUMBER, dateundergoes TIME, physician NUMBER, assistingnurse NUMBER)
CREATE TABLE medication (code NUMBER, name CLOB, brand CLOB, description CLOB)
CREATE TABLE nurse (employeeid NUMBER, name CLOB, position CLOB, registered BOOLEAN, ssn NUMBER)
CREATE TABLE on_call (nurse NUMBER, blockfloor NUMBER, blockcode NUMBER, oncallstart TIME, oncallend TIME)
CREATE TABLE block (blockfloor NUMBER, blockcode NUMBER)
CREATE TABLE physician (employeeid NUMBER, name CLOB, position CLOB, ssn NUMBER)
CREATE TABLE room (roomnumber NUMBER, roomtype CLOB, blockfloor NUMBER, blockcode NUMBER, unavailable BOOLEAN)
CREATE TABLE department (departmentid NUMBER, name CLOB, head NUMBER)
CREATE TABLE appointment (appointmentid NUMBER, patient NUMBER, prepnurse NUMBER, physician NUMBER, start TIME, end TIME, examinationroom CLOB)
CREATE TABLE trained_in (physician NUMBER, treatment NUMBER, certificationdate TIME, certificationexpires TIME)
CREATE TABLE prescribes (physician NUMBER, patient NUMBER, medication NUMBER, date TIME, appointment NUMBER, dose CLOB)
CREATE TABLE affiliated_with (physician NUMBER, department NUMBER, primaryaffiliation BOOLEAN)
CREATE TABLE procedures (code NUMBER, name CLOB, cost NUMBER)
CREATE TABLE patient (ssn NUMBER, name CLOB, address CLOB, phone CLOB, insuranceid NUMBER, pcp NUMBER)

Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.
SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen"
SELECT "name" FROM "procedures" WHERE "cost" < 5000 INTERSECT SELECT "T3"."name" FROM "physician" "T1" JOIN "trained_in" "T2" ON "T1"."employeeid" = "T2"."physician" JOIN "procedures" "T3" ON "T2"."treatment" = "T3"."code" WHERE "John Wen" = "T1"."name"