
CREATE TABLE artist (
	"Artist_ID" INTEGER, 
	"Name" TEXT, 
	"Country" TEXT, 
	"Year_Join" INTEGER, 
	"Age" INTEGER, 
	PRIMARY KEY ("Artist_ID")
)


CREATE TABLE exhibition (
	"Exhibition_ID" INTEGER, 
	"Year" INTEGER, 
	"Theme" TEXT, 
	"Artist_ID" INTEGER, 
	"Ticket_Price" REAL, 
	PRIMARY KEY ("Exhibition_ID"), 
	FOREIGN KEY("Artist_ID") REFERENCES artist ("Artist_ID")
)


CREATE TABLE exhibition_record (
	"Exhibition_ID" INTEGER, 
	"Date" TEXT, 
	"Attendance" INTEGER, 
	PRIMARY KEY ("Exhibition_ID", "Date"), 
	FOREIGN KEY("Exhibition_ID") REFERENCES exhibition ("Exhibition_ID")
)

CREATE TABLE artist (
	"Artist_ID" INTEGER, 
	"Name" TEXT, 
	"Country" TEXT, 
	"Year_Join" INTEGER, 
	"Age" INTEGER, 
	PRIMARY KEY ("Artist_ID")
)

/*
2 rows from artist table:
Artist_ID	Name	Country	Year_Join	Age
1	Vijay Singh	Fiji	1998	45
2	John Daly	United States	1991	46
*/


CREATE TABLE exhibition (
	"Exhibition_ID" INTEGER, 
	"Year" INTEGER, 
	"Theme" TEXT, 
	"Artist_ID" INTEGER, 
	"Ticket_Price" REAL, 
	PRIMARY KEY ("Exhibition_ID"), 
	FOREIGN KEY("Artist_ID") REFERENCES artist ("Artist_ID")
)

/*
2 rows from exhibition table:
Exhibition_ID	Year	Theme	Artist_ID	Ticket_Price
1	2004	Santa Claus	1	19.95
2	2005	Christmas stocking	2	19.95
*/


CREATE TABLE exhibition_record (
	"Exhibition_ID" INTEGER, 
	"Date" TEXT, 
	"Attendance" INTEGER, 
	PRIMARY KEY ("Exhibition_ID", "Date"), 
	FOREIGN KEY("Exhibition_ID") REFERENCES exhibition ("Exhibition_ID")
)

/*
2 rows from exhibition_record table:
Exhibition_ID	Date	Attendance
1	December 2	965
1	December 5	1098
*/
What are the themes and years for exhibitions, sorted by ticket price descending?
SELECT theme ,  YEAR FROM exhibition ORDER BY ticket_price DESC
[{'Theme': 'Spring', 'Year': 2008}, {'Theme': 'Santa Claus', 'Year': 2004}, {'Theme': 'Christmas stocking', 'Year': 2005}, {'Theme': 'Christmas Tree', 'Year': 2007}, {'Theme': 'Santa Claus and Rudolph the Red-Nosed Reindeer', 'Year': 2006}, {'Theme': 'Summer', 'Year': 2009}]