-- Database schema
| divisions : division [ TEXT ] primary_key , name [ TEXT ] , country [ TEXT ] | matchs : Div [ TEXT ] matchs.Div = divisions.division , Date [ DATE ] , HomeTeam [ TEXT ] , AwayTeam [ TEXT ] , FTHG [ INTEGER ] , FTAG [ INTEGER ] , FTR [ TEXT ] , season [ INTEGER ] |
-- -- What percentage of games won, games lost and games drawn does Cittadella have as a home team in total?

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';