CREATE TABLE student (lname VARCHAR(255), stuid VARCHAR(255)); CREATE TABLE has_pet (stuid VARCHAR(255), petid VARCHAR(255)); CREATE TABLE pets (petid VARCHAR(255), pet_age VARCHAR(255), pettype VARCHAR(255))
Find the last name of the student who has a cat that is age 3.
    
SQL: SELECT T1.lname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pet_age = 3 AND T3.pettype = 'cat'