
CREATE TABLE editor (
	"Editor_ID" INTEGER, 
	"Name" TEXT, 
	"Age" REAL, 
	PRIMARY KEY ("Editor_ID")
)


CREATE TABLE journal (
	"Journal_ID" INTEGER, 
	"Date" TEXT, 
	"Theme" TEXT, 
	"Sales" INTEGER, 
	PRIMARY KEY ("Journal_ID")
)


CREATE TABLE journal_committee (
	"Editor_ID" INTEGER, 
	"Journal_ID" INTEGER, 
	"Work_Type" TEXT, 
	PRIMARY KEY ("Editor_ID", "Journal_ID"), 
	FOREIGN KEY("Journal_ID") REFERENCES journal ("Journal_ID"), 
	FOREIGN KEY("Editor_ID") REFERENCES editor ("Editor_ID")
)

CREATE TABLE editor (
	"Editor_ID" INTEGER, 
	"Name" TEXT, 
	"Age" REAL, 
	PRIMARY KEY ("Editor_ID")
)

/*
2 rows from editor table:
Editor_ID	Name	Age
1	Kamila Porczyk	34.0
2	Anna Powierza	35.0
*/


CREATE TABLE journal (
	"Journal_ID" INTEGER, 
	"Date" TEXT, 
	"Theme" TEXT, 
	"Sales" INTEGER, 
	PRIMARY KEY ("Journal_ID")
)

/*
2 rows from journal table:
Journal_ID	Date	Theme	Sales
1	September 9, 2001	Miami Dolphins	798
2	September 23, 2001	at Jacksonville Jaguars	994
*/


CREATE TABLE journal_committee (
	"Editor_ID" INTEGER, 
	"Journal_ID" INTEGER, 
	"Work_Type" TEXT, 
	PRIMARY KEY ("Editor_ID", "Journal_ID"), 
	FOREIGN KEY("Journal_ID") REFERENCES journal ("Journal_ID"), 
	FOREIGN KEY("Editor_ID") REFERENCES editor ("Editor_ID")
)

/*
2 rows from journal_committee table:
Editor_ID	Journal_ID	Work_Type
1	13	Photo
8	17	Article
*/
List the names of editors who are older than 25.
SELECT Name FROM editor WHERE Age  >  25
[{'Name': 'Kamila Porczyk'}, {'Name': 'Anna Powierza'}, {'Name': 'Piotr Pręgowski'}, {'Name': 'Grażyna Wolszczak'}, {'Name': 'Maria Góralczyk'}]