Database schema:

CREATE TABLE chapters (
	id INTEGER -- example: ['18704', '18705'],
	"Act" INTEGER NOT NULL -- example: ['2', '1'],
	"Scene" INTEGER NOT NULL -- example: ['2', '1'],
	"Description" TEXT NOT NULL -- example: ['The sea-coast.', 'DUKE ORSINO’s palace.'],
	work_id INTEGER NOT NULL -- example: ['2', '1'],
	PRIMARY KEY (id), 
	CONSTRAINT fk_chapters_works FOREIGN KEY(work_id) REFERENCES works (id)
)


CREATE TABLE characters (
	id INTEGER -- example: ['2', '1'],
	"CharName" TEXT NOT NULL -- example: ['First Citizen', 'First Apparition'],
	"Abbrev" TEXT NOT NULL -- example: ['First Citizen', 'First Apparition'],
	"Description" TEXT NOT NULL -- example: ['', 'A senator of Venice'],
	PRIMARY KEY (id)
)


CREATE TABLE paragraphs (
	id INTEGER -- example: ['630863', '630864'],
	"ParagraphNum" INTEGER NOT NULL -- example: ['4', '3'],
	"PlainText" TEXT NOT NULL -- example: ['[Enter DUKE ORSINO, CURIO, and other Lords; Musici', 'If music be the food of love, play on;\nGive me exc'],
	character_id INTEGER NOT NULL -- example: ['1261', '840'],
	chapter_id INTEGER DEFAULT 0 NOT NULL -- example: ['18704', '18705'],
	PRIMARY KEY (id), 
	CONSTRAINT fk_paragraphs_chapters FOREIGN KEY(chapter_id) REFERENCES chapters (id),
	CONSTRAINT fk_paragraphs_characters FOREIGN KEY(character_id) REFERENCES characters (id)
)


CREATE TABLE works (
	id INTEGER -- example: ['2', '1'],
	"Title" TEXT NOT NULL -- example: ['Twelfth Night', "All's Well That Ends Well"],
	"LongTitle" TEXT NOT NULL -- example: ['Twelfth Night, Or What You Will', "All's Well That Ends Well"],
	"Date" INTEGER NOT NULL -- example: ['1602', '1599'],
	"GenreType" TEXT NOT NULL -- example: ['Tragedy', 'Comedy'],
	PRIMARY KEY (id)
)

Question: From 1593 onwards, what is the difference between the number of comedy works and history works?
Evidence: From 1593 onwards refers to Date > 1593; comedy works and history works refers to GenreType = 'comedy' and GenreType = 'History'

SQL:
SELECT SUM(IIF(GenreType = 'Comedy', 1, 0)) - SUM(IIF(GenreType = 'History', 1, 0)) FROM works WHERE Date > 1593