
CREATE TABLE event (
	"ID" INTEGER, 
	"Name" TEXT, 
	"Stadium_ID" INTEGER, 
	"Year" TEXT, 
	PRIMARY KEY ("ID"), 
	FOREIGN KEY("Stadium_ID") REFERENCES stadium ("ID")
)


CREATE TABLE record (
	"ID" INTEGER, 
	"Result" TEXT, 
	"Swimmer_ID" INTEGER, 
	"Event_ID" INTEGER, 
	PRIMARY KEY ("Swimmer_ID", "Event_ID"), 
	FOREIGN KEY("Swimmer_ID") REFERENCES swimmer ("ID"), 
	FOREIGN KEY("Event_ID") REFERENCES event ("ID")
)


CREATE TABLE stadium (
	"ID" INTEGER, 
	name TEXT, 
	"Capacity" INTEGER, 
	"City" TEXT, 
	"Country" TEXT, 
	"Opening_year" INTEGER, 
	PRIMARY KEY ("ID")
)


CREATE TABLE swimmer (
	"ID" INTEGER, 
	name TEXT, 
	"Nationality" TEXT, 
	meter_100 REAL, 
	meter_200 TEXT, 
	meter_300 TEXT, 
	meter_400 TEXT, 
	meter_500 TEXT, 
	meter_600 TEXT, 
	meter_700 TEXT, 
	"Time" TEXT, 
	PRIMARY KEY ("ID")
)

CREATE TABLE event (
	"ID" INTEGER, 
	"Name" TEXT, 
	"Stadium_ID" INTEGER, 
	"Year" TEXT, 
	PRIMARY KEY ("ID"), 
	FOREIGN KEY("Stadium_ID") REFERENCES stadium ("ID")
)

/*
2 rows from event table:
ID	Name	Stadium_ID	Year
1	FINA	1	2016
2	Pacific	10	2011
*/


CREATE TABLE record (
	"ID" INTEGER, 
	"Result" TEXT, 
	"Swimmer_ID" INTEGER, 
	"Event_ID" INTEGER, 
	PRIMARY KEY ("Swimmer_ID", "Event_ID"), 
	FOREIGN KEY("Swimmer_ID") REFERENCES swimmer ("ID"), 
	FOREIGN KEY("Event_ID") REFERENCES event ("ID")
)

/*
2 rows from record table:
ID	Result	Swimmer_ID	Event_ID
1	NC	1	1
2	Win	1	2
*/


CREATE TABLE stadium (
	"ID" INTEGER, 
	name TEXT, 
	"Capacity" INTEGER, 
	"City" TEXT, 
	"Country" TEXT, 
	"Opening_year" INTEGER, 
	PRIMARY KEY ("ID")
)

/*
2 rows from stadium table:
ID	name	Capacity	City	Country	Opening_year
1	Nou Mestalla	75000	Valencia	Spain	2004
2	Gazprom Arena	69501	Saint Petersburg	Russia	2005
*/


CREATE TABLE swimmer (
	"ID" INTEGER, 
	name TEXT, 
	"Nationality" TEXT, 
	meter_100 REAL, 
	meter_200 TEXT, 
	meter_300 TEXT, 
	meter_400 TEXT, 
	meter_500 TEXT, 
	meter_600 TEXT, 
	meter_700 TEXT, 
	"Time" TEXT, 
	PRIMARY KEY ("ID")
)

/*
2 rows from swimmer table:
ID	name	Nationality	meter_100	meter_200	meter_300	meter_400	meter_500	meter_600	meter_700	Time
7	Przemysław Stańczyk	Poland	57.31	1:57.10	2:56.02	3:55.36	4:54.21	5:52.59	6:50.91	7:47.91
4	Craig Stevens	Australia	57.35	1:56.34	2:55.90	3:55.72	4:55.08	5:54.45	6:52.69	7:48.67
*/
Find the name and capacity of the stadium where the event named "World Junior" happened.
SELECT t1.name ,  t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id  =  t2.stadium_id WHERE t2.name  =  'World Junior'
[{'name': 'Baku Olympic Stadium', 'Capacity': 68000}]