
CREATE TABLE "Has_Pet" (
	"StuID" INTEGER, 
	"PetID" INTEGER, 
	FOREIGN KEY("PetID") REFERENCES "Pets" ("PetID"), 
	FOREIGN KEY("StuID") REFERENCES "Student" ("StuID")
)


CREATE TABLE "Pets" (
	"PetID" INTEGER, 
	"PetType" VARCHAR(20), 
	pet_age INTEGER, 
	weight REAL, 
	PRIMARY KEY ("PetID")
)


CREATE TABLE "Student" (
	"StuID" INTEGER, 
	"LName" VARCHAR(12), 
	"Fname" VARCHAR(12), 
	"Age" INTEGER, 
	"Sex" VARCHAR(1), 
	"Major" INTEGER, 
	"Advisor" INTEGER, 
	city_code VARCHAR(3), 
	PRIMARY KEY ("StuID")
)

CREATE TABLE "Has_Pet" (
	"StuID" INTEGER, 
	"PetID" INTEGER, 
	FOREIGN KEY("PetID") REFERENCES "Pets" ("PetID"), 
	FOREIGN KEY("StuID") REFERENCES "Student" ("StuID")
)

/*
2 rows from Has_Pet table:
StuID	PetID
1001	2001
1002	2002
*/


CREATE TABLE "Pets" (
	"PetID" INTEGER, 
	"PetType" VARCHAR(20), 
	pet_age INTEGER, 
	weight REAL, 
	PRIMARY KEY ("PetID")
)

/*
2 rows from Pets table:
PetID	PetType	pet_age	weight
2001	cat	3	12.0
2002	dog	2	13.4
*/


CREATE TABLE "Student" (
	"StuID" INTEGER, 
	"LName" VARCHAR(12), 
	"Fname" VARCHAR(12), 
	"Age" INTEGER, 
	"Sex" VARCHAR(1), 
	"Major" INTEGER, 
	"Advisor" INTEGER, 
	city_code VARCHAR(3), 
	PRIMARY KEY ("StuID")
)

/*
2 rows from Student table:
StuID	LName	Fname	Age	Sex	Major	Advisor	city_code
1001	Smith	Linda	18	F	600	1121	BAL
1002	Kim	Tracy	19	F	600	7712	HKG
*/
Find the id of students who do not have a cat pet.
SELECT stuid FROM student EXCEPT SELECT T1.stuid 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.pettype  =  'cat'
[{'StuID': 1002}, {'StuID': 1003}, {'StuID': 1004}, {'StuID': 1005}, {'StuID': 1006}, {'StuID': 1007}, {'StuID': 1008}, {'StuID': 1009}, {'StuID': 1010}, {'StuID': 1011}, {'StuID': 1012}, {'StuID': 1014}, {'StuID': 1015}, {'StuID': 1016}, {'StuID': 1017}, {'StuID': 1018}, {'StuID': 1019}, {'StuID': 1020}, {'StuID': 1021}, {'StuID': 1022}, {'StuID': 1023}, {'StuID': 1024}, {'StuID': 1025}, {'StuID': 1026}, {'StuID': 1027}, {'StuID': 1028}, {'StuID': 1029}, {'StuID': 1030}, {'StuID': 1031}, {'StuID': 1032}, {'StuID': 1033}, {'StuID': 1034}, {'StuID': 1035}]