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

What is the id of the patient who stayed in room 111 most recently?
SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1
SELECT "patient" FROM "stay" WHERE "room" = 111 ORDER BY "staystart" DESC NULLS LAST LIMIT 1