### Database Schema:
CREATE TABLE Toss_Decision (
	Toss_Id	INTEGER	NULL	PRIMARY KEY,
	Toss_Name	TEXT	NULL
);

CREATE TABLE Batting_Style (
	Batting_Id	INTEGER	NULL	PRIMARY KEY,
	Batting_hand	TEXT	NULL
);

CREATE TABLE Bowling_Style (
	Bowling_Id	INTEGER	NULL	PRIMARY KEY,
	Bowling_skill	TEXT	NULL
);

CREATE TABLE Extra_Runs (
	Match_Id	INTEGER	NULL	PRIMARY KEY,
	Over_Id	INTEGER	NULL	PRIMARY KEY,
	Ball_Id	INTEGER	NULL	PRIMARY KEY,
	Extra_Type_Id	INTEGER	NULL,
	Extra_Runs	INTEGER	NULL,
	Innings_No	INTEGER	NULL	PRIMARY KEY,
	foreign key (Extra_Type_Id) references Extra_Type (Extra_Id)
);

CREATE TABLE Extra_Type (
	Extra_Id	INTEGER	NULL	PRIMARY KEY,
	Extra_Name	TEXT	NULL
);

CREATE TABLE Win_By (
	Win_Id	INTEGER	NULL	PRIMARY KEY,
	Win_Type	TEXT	NULL
);

CREATE TABLE Ball_by_Ball (
	Match_Id	INTEGER	NULL	PRIMARY KEY,
	Over_Id	INTEGER	NULL	PRIMARY KEY,
	Ball_Id	INTEGER	NULL	PRIMARY KEY,
	Innings_No	INTEGER	NULL	PRIMARY KEY,
	Team_Batting	INTEGER	NULL,
	Team_Bowling	INTEGER	NULL,
	Striker_Batting_Position	INTEGER	NULL,
	Striker	INTEGER	NULL,
	Non_Striker	INTEGER	NULL,
	Bowler	INTEGER	NULL,
	foreign key (Match_Id) references Match (Match_Id)
);

CREATE TABLE Season (
	Season_Id	INTEGER	NULL	PRIMARY KEY,
	Man_of_the_Series	INTEGER	NULL,
	Orange_Cap	INTEGER	NULL,
	Purple_Cap	INTEGER	NULL,
	Season_Year	INTEGER	NULL
);

CREATE TABLE Wicket_Taken (
	Match_Id	INTEGER	NULL	PRIMARY KEY,
	Over_Id	INTEGER	NULL	PRIMARY KEY,
	Ball_Id	INTEGER	NULL	PRIMARY KEY,
	Player_Out	INTEGER	NULL,
	Kind_Out	INTEGER	NULL,
	Fielders	INTEGER	NULL,
	Innings_No	INTEGER	NULL	PRIMARY KEY,
	foreign key (Match_Id) references Match (Match_Id),
	foreign key (Kind_Out) references Out_Type (Out_Id),
	foreign key (Player_Out) references Player (Player_Id),
	foreign key (Fielders) references Player (Player_Id)
);

CREATE TABLE Out_Type (
	Out_Id	INTEGER	NULL	PRIMARY KEY,
	Out_Name	TEXT	NULL
);

CREATE TABLE Batsman_Scored (
	Match_Id	INTEGER	NULL	PRIMARY KEY,
	Over_Id	INTEGER	NULL	PRIMARY KEY,
	Ball_Id	INTEGER	NULL	PRIMARY KEY,
	Runs_Scored	INTEGER	NULL,
	Innings_No	INTEGER	NULL	PRIMARY KEY,
	foreign key (Match_Id) references Match (Match_Id)
);

CREATE TABLE Team (
	Team_Id	INTEGER	NULL	PRIMARY KEY,
	Team_Name	TEXT	NULL
);

CREATE TABLE Rolee (
	Role_Id	INTEGER	NULL	PRIMARY KEY,
	Role_Desc	TEXT	NULL
);

CREATE TABLE Match (
	Match_Id	INTEGER	NULL	PRIMARY KEY,
	Team_1	INTEGER	NULL,
	Team_2	INTEGER	NULL,
	Match_Date	DATE	NULL,
	Season_Id	INTEGER	NULL,
	Venue_Id	INTEGER	NULL,
	Toss_Winner	INTEGER	NULL,
	Toss_Decide	INTEGER	NULL,
	Win_Type	INTEGER	NULL,
	Win_Margin	INTEGER	NULL,
	Outcome_type	INTEGER	NULL,
	Match_Winner	INTEGER	NULL,
	Man_of_the_Match	INTEGER	NULL,
	foreign key (Man_of_the_Match) references Player (Player_Id),
	foreign key (Outcome_type) references Out_Type (Out_Id),
	foreign key (Match_Winner) references Team (Team_Id),
	foreign key (Team_1) references Team (Team_Id),
	foreign key (Win_Type) references Win_By (Win_Id),
	foreign key (Season_Id) references Season (Season_Id),
	foreign key (Team_2) references Team (Team_Id),
	foreign key (Toss_Winner) references Team (Team_Id),
	foreign key (Venue_Id) references Venue (Venue_Id),
	foreign key (Toss_Decide) references Toss_Decision (Toss_Id)
);

CREATE TABLE Outcome (
	Outcome_Id	INTEGER	NULL	PRIMARY KEY,
	Outcome_Type	TEXT	NULL
);

CREATE TABLE Player (
	Player_Id	INTEGER	NULL	PRIMARY KEY,
	Player_Name	TEXT	NULL,
	DOB	DATE	NULL,
	Batting_hand	INTEGER	NULL,
	Bowling_skill	INTEGER	NULL,
	Country_Name	INTEGER	NULL,
	foreign key (Batting_hand) references Batting_Style (Batting_Id),
	foreign key (Bowling_skill) references Bowling_Style (Bowling_Id),
	foreign key (Country_Name) references Country (Country_Id)
);

CREATE TABLE Country (
	Country_Id	INTEGER	NULL	PRIMARY KEY,
	Country_Name	TEXT	NULL,
	foreign key (Country_Id) references Country (Country_Id)
);

CREATE TABLE Umpire (
	Umpire_Id	INTEGER	NULL	PRIMARY KEY,
	Umpire_Name	TEXT	NULL,
	Umpire_Country	INTEGER	NULL,
	foreign key (Umpire_Country) references Country (Country_Id)
);

CREATE TABLE Player_Match (
	Match_Id	INTEGER	NULL	PRIMARY KEY,
	Player_Id	INTEGER	NULL	PRIMARY KEY,
	Role_Id	INTEGER	NULL	PRIMARY KEY,
	Team_Id	INTEGER	NULL,
	foreign key (Team_Id) references Team (Team_Id),
	foreign key (Match_Id) references Match (Match_Id),
	foreign key (Player_Id) references Player (Player_Id),
	foreign key (Role_Id) references Rolee (Role_Id)
);

CREATE TABLE City (
	City_Id	INTEGER	NULL	PRIMARY KEY,
	City_Name	TEXT	NULL,
	Country_id	INTEGER	NULL
);

CREATE TABLE Venue (
	Venue_Id	INTEGER	NULL	PRIMARY KEY,
	Venue_Name	TEXT	NULL,
	City_Id	INTEGER	NULL,
	foreign key (City_Id) references City (City_Id)
);

### User's Query:
How many of the matches are Superover?

### Extra Knowledge:
Superover refers to Outcome_Type = 'Superover'
SELECT SUM(CASE WHEN T2.Outcome_Type = 'Superover' THEN 1 ELSE 0 END) FROM Match AS T1 INNER JOIN Outcome AS T2 ON T2.Outcome_Id = T1.Outcome_type