CREATE TABLE has_pet (petid VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE student (stuid VARCHAR(255), Lname VARCHAR(255))
Find the id of the pet owned by student whose last name is ‘Smith’.
    
SQL: SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'