
CREATE TABLE concert (
	"concert_ID" INTEGER, 
	"concert_Name" TEXT, 
	"Theme" TEXT, 
	"Stadium_ID" TEXT, 
	"Year" TEXT, 
	PRIMARY KEY ("concert_ID"), 
	FOREIGN KEY("Stadium_ID") REFERENCES stadium ("Stadium_ID")
)


CREATE TABLE singer (
	"Singer_ID" INTEGER, 
	"Name" TEXT, 
	"Country" TEXT, 
	"Song_Name" TEXT, 
	"Song_release_year" TEXT, 
	"Age" INTEGER, 
	"Is_male" BOOLEAN, 
	PRIMARY KEY ("Singer_ID")
)


CREATE TABLE singer_in_concert (
	"concert_ID" INTEGER, 
	"Singer_ID" TEXT, 
	PRIMARY KEY ("concert_ID", "Singer_ID"), 
	FOREIGN KEY("concert_ID") REFERENCES concert ("concert_ID"), 
	FOREIGN KEY("Singer_ID") REFERENCES singer ("Singer_ID")
)


CREATE TABLE stadium (
	"Stadium_ID" INTEGER, 
	"Location" TEXT, 
	"Name" TEXT, 
	"Capacity" INTEGER, 
	"Highest" INTEGER, 
	"Lowest" INTEGER, 
	"Average" INTEGER, 
	PRIMARY KEY ("Stadium_ID")
)

CREATE TABLE concert (
	"concert_ID" INTEGER, 
	"concert_Name" TEXT, 
	"Theme" TEXT, 
	"Stadium_ID" TEXT, 
	"Year" TEXT, 
	PRIMARY KEY ("concert_ID"), 
	FOREIGN KEY("Stadium_ID") REFERENCES stadium ("Stadium_ID")
)

/*
2 rows from concert table:
concert_ID	concert_Name	Theme	Stadium_ID	Year
1	Auditions	Free choice	1	2014
2	Super bootcamp	Free choice 2	2	2014
*/


CREATE TABLE singer (
	"Singer_ID" INTEGER, 
	"Name" TEXT, 
	"Country" TEXT, 
	"Song_Name" TEXT, 
	"Song_release_year" TEXT, 
	"Age" INTEGER, 
	"Is_male" BOOLEAN, 
	PRIMARY KEY ("Singer_ID")
)

/*
2 rows from singer table:
Singer_ID	Name	Country	Song_Name	Song_release_year	Age	Is_male
1	Joe Sharp	Netherlands	You	1992	52	True
2	Timbaland	United States	Dangerous	2008	32	True
*/


CREATE TABLE singer_in_concert (
	"concert_ID" INTEGER, 
	"Singer_ID" TEXT, 
	PRIMARY KEY ("concert_ID", "Singer_ID"), 
	FOREIGN KEY("concert_ID") REFERENCES concert ("concert_ID"), 
	FOREIGN KEY("Singer_ID") REFERENCES singer ("Singer_ID")
)

/*
2 rows from singer_in_concert table:
concert_ID	Singer_ID
1	2
1	3
*/


CREATE TABLE stadium (
	"Stadium_ID" INTEGER, 
	"Location" TEXT, 
	"Name" TEXT, 
	"Capacity" INTEGER, 
	"Highest" INTEGER, 
	"Lowest" INTEGER, 
	"Average" INTEGER, 
	PRIMARY KEY ("Stadium_ID")
)

/*
2 rows from stadium table:
Stadium_ID	Location	Name	Capacity	Highest	Lowest	Average
1	Raith Rovers	Stark's Park	10104	4812	1294	2106
2	Ayr United	Somerset Park	11998	2363	1057	1477
*/
Show name, country, age for all singers ordered by age from the oldest to the youngest.
SELECT name ,  country ,  age FROM singer ORDER BY age DESC
[{'Name': 'Joe Sharp', 'Country': 'Netherlands', 'Age': 52}, {'Name': 'John Nizinik', 'Country': 'France', 'Age': 43}, {'Name': 'Rose White', 'Country': 'France', 'Age': 41}, {'Name': 'Timbaland', 'Country': 'United States', 'Age': 32}, {'Name': 'Justin Brown', 'Country': 'France', 'Age': 29}, {'Name': 'Tribal King', 'Country': 'France', 'Age': 25}]