
CREATE TABLE "Club" (
	"ClubID" INTEGER, 
	"ClubName" VARCHAR(40), 
	"ClubDesc" VARCHAR(1024), 
	"ClubLocation" VARCHAR(40), 
	PRIMARY KEY ("ClubID")
)


CREATE TABLE "Member_of_club" (
	"StuID" INTEGER, 
	"ClubID" INTEGER, 
	"Position" VARCHAR(40), 
	FOREIGN KEY("StuID") REFERENCES "Student" ("StuID"), 
	FOREIGN KEY("ClubID") REFERENCES "Club" ("ClubID")
)


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 "Club" (
	"ClubID" INTEGER, 
	"ClubName" VARCHAR(40), 
	"ClubDesc" VARCHAR(1024), 
	"ClubLocation" VARCHAR(40), 
	PRIMARY KEY ("ClubID")
)

/*
2 rows from Club table:
ClubID	ClubName	ClubDesc	ClubLocation
1	Bootup Baltimore	Refurbish computers; teach kids and adults about computer basics.	AKW
2	Hopkins Student Enterprises	Venture capital fund for student business.	AKW
*/


CREATE TABLE "Member_of_club" (
	"StuID" INTEGER, 
	"ClubID" INTEGER, 
	"Position" VARCHAR(40), 
	FOREIGN KEY("StuID") REFERENCES "Student" ("StuID"), 
	FOREIGN KEY("ClubID") REFERENCES "Club" ("ClubID")
)

/*
2 rows from Member_of_club table:
StuID	ClubID	Position
1001	1	President
1007	4	Vice-President
*/


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
*/
How many clubs are there?
SELECT count(*) FROM club
[{'count(*)': 4}]