CREATE TABLE Prescribes (Patient VARCHAR2, Medication VARCHAR2)
CREATE TABLE patient (SSN VARCHAR2)
CREATE TABLE Medication (name VARCHAR2, Code VARCHAR2)
CREATE TABLE stay (Patient VARCHAR2)

Find the name of medication used on the patient who stays in room 111?
SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111
SELECT "T4"."name" FROM "stay" "T1" JOIN "patient" "T2" ON "T1"."Patient" = "T2"."SSN" JOIN "Prescribes" "T3" ON "T2"."SSN" = "T3"."Patient" JOIN "Medication" "T4" ON "T3"."Medication" = "T4"."Code" WHERE "room" = 111