
CREATE TABLE event (
	"Event_ID" INTEGER, 
	"Date" TEXT, 
	"Venue" TEXT, 
	"Name" TEXT, 
	"Event_Attendance" INTEGER, 
	PRIMARY KEY ("Event_ID")
)


CREATE TABLE journalist (
	"journalist_ID" INTEGER, 
	"Name" TEXT, 
	"Nationality" TEXT, 
	"Age" TEXT, 
	"Years_working" INTEGER, 
	PRIMARY KEY ("journalist_ID")
)


CREATE TABLE news_report (
	"journalist_ID" INTEGER, 
	"Event_ID" INTEGER, 
	"Work_Type" TEXT, 
	PRIMARY KEY ("journalist_ID", "Event_ID"), 
	FOREIGN KEY("Event_ID") REFERENCES event ("Event_ID"), 
	FOREIGN KEY("journalist_ID") REFERENCES journalist ("journalist_ID")
)

CREATE TABLE event (
	"Event_ID" INTEGER, 
	"Date" TEXT, 
	"Venue" TEXT, 
	"Name" TEXT, 
	"Event_Attendance" INTEGER, 
	PRIMARY KEY ("Event_ID")
)

/*
2 rows from event table:
Event_ID	Date	Venue	Name	Event_Attendance
1	13 October 2008	Marathon	Olympia Games Openning	6650
2	11 October 2007	Victoria	Government Hearing	369
*/


CREATE TABLE journalist (
	"journalist_ID" INTEGER, 
	"Name" TEXT, 
	"Nationality" TEXT, 
	"Age" TEXT, 
	"Years_working" INTEGER, 
	PRIMARY KEY ("journalist_ID")
)

/*
2 rows from journalist table:
journalist_ID	Name	Nationality	Age	Years_working
1	Herbert Swindells	England	37	10
2	Fred Keenor	Wales	27	5
*/


CREATE TABLE news_report (
	"journalist_ID" INTEGER, 
	"Event_ID" INTEGER, 
	"Work_Type" TEXT, 
	PRIMARY KEY ("journalist_ID", "Event_ID"), 
	FOREIGN KEY("Event_ID") REFERENCES event ("Event_ID"), 
	FOREIGN KEY("journalist_ID") REFERENCES journalist ("journalist_ID")
)

/*
2 rows from news_report table:
journalist_ID	Event_ID	Work_Type
1	3	Screening
11	5	Screening
*/
Show the dates, places, and names of events in descending order of the attendance.
SELECT Date ,  Name ,  venue FROM event ORDER BY Event_Attendance DESC
[{'Date': '13 October 2008', 'Name': 'Olympia Games Openning', 'Venue': 'Marathon'}, {'Date': '20 June 2018', 'Name': 'Global Awarding', 'Venue': 'Platense'}, {'Date': '7 October 2010', 'Name': 'Public Debating', 'Venue': 'Motagua'}, {'Date': '11 October 2007', 'Name': 'Government Hearing', 'Venue': 'Victoria'}, {'Date': '9 April 2014', 'Name': 'Special Exhibition', 'Venue': 'Hispano'}]