
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
*/
Show the distinct themes of journals.
SELECT DISTINCT Theme FROM journal
[{'Theme': 'Miami Dolphins'}, {'Theme': 'at Jacksonville Jaguars'}, {'Theme': 'at Baltimore Ravens'}, {'Theme': 'Tampa Bay Buccaneers'}, {'Theme': 'at Detroit Lions'}, {'Theme': 'at Pittsburgh Steelers'}, {'Theme': 'Jacksonville Jaguars'}, {'Theme': 'Baltimore Ravens'}, {'Theme': 'at Cincinnati Bengals'}, {'Theme': 'Pittsburgh Steelers'}, {'Theme': 'at Cleveland Browns'}, {'Theme': 'at Minnesota Vikings'}, {'Theme': 'Green Bay Packers'}, {'Theme': 'at Oakland Raiders'}, {'Theme': 'Cleveland Browns'}, {'Theme': 'Cincinnati Bengals'}]