Database schema:

CREATE TABLE divisions (
	division TEXT NOT NULL -- example: ['D1', 'B1'],
	name TEXT -- example: ['Division 1A', 'Bundesliga'],
	country TEXT -- example: ['Deutschland', 'Belgium'],
	PRIMARY KEY (division)
)


CREATE TABLE matchs (
	"Div" TEXT -- example: ['D1', 'B1'],
	"Date" DATE -- example: ['2020-08-08', '2020-08-09'],
	"HomeTeam" TEXT -- example: ['Antwerp', 'Club Brugge'],
	"AwayTeam" TEXT -- example: ['Mouscron', 'Charleroi'],
	"FTHG" INTEGER -- example: ['0', '1'],
	"FTAG" INTEGER -- example: ['0', '1'],
	"FTR" TEXT -- example: ['A', 'D'],
	season INTEGER -- example: ['2020', '2021'],
	CONSTRAINT fk_matchs_divisions FOREIGN KEY("Div") REFERENCES divisions (division)
)

Question: What percentage of games won, games lost and games drawn does Cittadella have as a home team in total?
Evidence: Percentage of games won = DIVIDE(COUNT(FTR = 'H' where HomeTeam = 'Cittadella'), COUNT(Div where HomeTeam = 'Cittadella')) as percentage; Percentage of games lost = DIVIDE(COUNT(FTR = 'A' where HomeTeam = 'Cittadella')), COUNT(Div where HomeTeam = 'Cittadella') as percentage; percentage of games drawn = DIVIDE(SUM(FTR = 'D'where HomeTeam = 'Cittadella'), COUNT(Div where HomeTeam = 'Cittadella')) as percentage;


SQL:
SELECT CAST(COUNT(CASE WHEN FTR = 'H' THEN 1 ELSE NULL END) / COUNT(HomeTeam) AS REAL) * 100, CAST(COUNT(CASE WHEN FTR = 'A' THEN 1 ELSE NULL END) AS REAL) / COUNT(HomeTeam), CAST(COUNT(CASE WHEN FTR = 'D' THEN 1 ELSE NULL END) AS REAL) / COUNT(HomeTeam) FROM matchs WHERE HomeTeam = 'Cittadella'