0% found this document useful (0 votes)
67 views

Its Project 2: Ipl Data Analysis

The document is a report submitted by a group for their IPL data analysis project. It provides an overview of the Indian Premier League including key details like the number of seasons played, participating teams, and tournament format. It then describes 7 databases containing IPL match statistics and player data that were analyzed. The rest of the document consists of 12 SQL queries run on these databases to extract relevant information like matches decided by Duckworth-Lewis, team performance statistics, player awards won, and other details.

Uploaded by

Pranshu Raj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Its Project 2: Ipl Data Analysis

The document is a report submitted by a group for their IPL data analysis project. It provides an overview of the Indian Premier League including key details like the number of seasons played, participating teams, and tournament format. It then describes 7 databases containing IPL match statistics and player data that were analyzed. The rest of the document consists of 12 SQL queries run on these databases to extract relevant information like matches decided by Duckworth-Lewis, team performance statistics, player awards won, and other details.

Uploaded by

Pranshu Raj
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

ITS PROJECT 2

IPL DATA ANALYSIS

SUBMITTED BY: GROUP-6


AVINASH YAMALA (1226)
PRANSHU (1227)
ABHISHEK (1228)
SAURAV (1229)
DEWASHISH KASHYAP (1230)
1

IPL (INDIAN PREMIER LEAGUE)


The Indian Premier League is a professional Twenty20 cricket league in India contested
during April-May of every year. Every year eight teams of different regions of India
participate in this tournament. Both domestic as well as overseas cricketers from around the
globe participate in this mammoth tournament.
The tournament started in 2008 and till 2019, 12 seasons of IPL has been organised. It is
broadcasted all over India and world via different media channels like Hotstar, Star Sports
etc. Till now total 577 matches have been played over 12 seasons. Mumbai Indians is the
most successful team of IPL with 4 winning title in its bag. The two months of IPL is like a
festival in India. Every cricket fans try to support their teams over different social media
platforms like twitter, Facebook etc. One can estimate the impact of IPL in India by
considering the fact that Vivo, a smartphone company paid $330M to sponsor India’s most-
watched cricketing event.
The format of tournament is quite simple. Players from around the world are auctioned and
Teams bid for players. Players consist of International as well as local uncapped player.
Every team has limited amount of money in their purse within which they have to form a
team. Each team plays two matches with one another in the league stage, one on their
home ground and another on opponent’s ground. Within eight teams four teams qualify for
the playoffs and final two teams are selected from playoffs only. It is a big platform for
young domestic players to get recognised in the world cricket and get early ticket to
international cricket. For International overseas players, it gives them a chance to interact
with local Indian talent and also get acquainted with their counterparts from other teams.
Such tournament has increased sportsmanship and camaraderie among cricketers.
Database
We have been provided with 7 different database which has some relevant information and
statistics about the tournament till now.
The database consists of information like ball by ball information, venue information,
cricketer’s statistics, team’s performance information and statistics etc.
1. Ball by information-This database has attributes like match id, teams which are playing
this match and what happened in every ball. Team id, match id, striker id have been
provided in this database.
2. Match -This database has information and statistics like total matches till date, which
team won the match, which team won the toss as well the venue of the match. With this
database we can find queries like of all the teams who won the match with DLS, Which team
batted first and won the match, which team has won maximum matches etc.
3. Players- This database consists of information and statistics about players. There is
information like player is a bowler or batman, player is right-handed or left-handed, player
2

belong to which country and so on. With this database, we can find queries like: list of all
the right-handed players etc.
4. Player match- This database consists of information like player_id, team it belongs to etc.
This database can help us finding queries between two or more different databases.
5. Season -This database has information years with season number. It also has information
like player_id of orange cap and purple cup winners. With this database we can find queries
like which player won orange cap for which season etc.
6. Teams -This database consists of teams and short code for team name. This database can
help in finding query like which player belong to which team.

List of queries:
Question 1: List of all the matches where Duckworth Lewis has been used to decide the
result of the match.
Command:
SELECT Match_Date
FROM `match`
WHERE Is_DuckWorthLewis=1;
Output:
Match_Date

17-May-08
18-May-08
19-Apr-09
21-Apr-09
07-May-09
18-Apr-11
07-May-11
14-May-11
10-May-14
22-Apr-15
15-May-15
26-Apr-16
14-May-16
17-May-16
18-May-16

In the case of rain, Duckworth Lewis method is used to make the result fairly.

Question 2: List the team having


Toss winner Id=Match winner Id
Command:
SELECT Team_Name
FROM `team`
WHERE Team_Id IN (SELECT Team_name_id FROM `match` WHERE Toss_Winner_Id=Match_Winner_Id)

Output:
Team_Name
3

Kolkata Knight Riders


Royal Challengers Bangalore
Chennai Super Kings
Kings XI Punjab
Rajasthan Royals
Delhi Daredevils
Mumbai Indians
Deccan Chargers
Kochi Tuskers Kerala
Pune Warriors
Sunrisers Hyderabad
Rising Pune Supergiants
Gujarat Lions
During toss, the team which win the toss has the option to choose between
batting and bowling then the decision of the becomes worth when team win
the match.

Question 3: List the team having


Toss winner Id=Match winner Id and who have chosen to bat first.

Command :
SELECT Team_Name
FROM `team`
WHERE Team_Id IN (SELECT Team_Name_Id FROM `match` WHERE Toss_Winner_Id=Match_Winner_Id AND
Toss_decision='bat')

Output:
Team_Name

Kolkata Knight Riders


Royal Challengers Bangalore
Chennai Super Kings
Kings XI Punjab
Rajasthan Royals
Delhi Daredevils
Mumbai Indians
Deccan Chargers
Kochi Tuskers Kerala
Pune Warriors
Sunrisers Hyderabad
Rising Pune Supergiants

During the toss, the team which wins the toss, choose between bowling and
batting according the preferred situations.

Question 4: How many times Virat Kohli (player Id-8) has won man of the match.

Command :
SELECT COUNT(Man_Of_The_Match_Id)
FROM `match`
WHERE Man_Of_The_Match_Id=8

Output:
COUNT(Man_Of_The_Match_Id)
4

11

The true performance of any player is represented by the no. of awards he/she
gets, here it is the Man of The Match award.

Question 5: List of all players who bat with left hand and bowl with right hand.

Command :
SELECT Player_Name
FROM `player`
WHERE Batting_Hand='Left_Hand' AND Bowling_Skill='Right-arm medium'

Output:
Player_Name

SC Ganguly
ML Hayden
MEK Hussey
AM Nayar
TM Srivastava
JD Ryder
RJ Quiney
Anirudh Singh
EJG Morgan
MJ Lumb
S Narwal
FY Fazal
MS Wade
TR Birt
Harpreet Singh
JDS Neesham
UT Khawaja

A multi talented player is those player who can use both of his/her hand
whether in batting or bowling perfectly.

Question 6: List of dates when venue is Eden Gardens

Command :
SELECT Match_Date
FROM `match`
WHERE Venue_Name='Eden Gardens'

Output:\
Match_Date

20-Apr-08
29-Apr-08
08-May-08
13-May-08
18-May-08
20-May-08
25-May-08
5

14-Mar-10
16-Mar-10
01-Apr-10
04-Apr-10
07-Apr-10
17-Apr-10
19-Apr-10
11-Apr-11
17-Apr-11
20-Apr-11
22-Apr-11
30-Apr-11
07-May-11
22-May-11
05-Apr-12
13-Apr-12
15-Apr-12
28-Apr-12

Maximum no. of matches are played in those grounds which fulfils all the
requirement of the tournament.
Question 7: List number of times when match Id=3 wins at Eden Gardens.

Command :
SELECT COUNT(Match_Winner_Id)
FROM `match`
WHERE Match_Winner_Id=3 AND Venue_Name='Eden Gardens'

Output:
COUNT(Match_Winner_Id)
4

A team whether it is perfect in any particular ground or not is determined by


the no. of matches it wins.

Question 8: In which season the player with Id=162 won the orange cap

Command :
SELECT Season_Year
FROM `season`
WHERE Orange_Cap_Id=162

Output:
Season_Year

2011
2012

A player who scores highest runs in any particular match got orange cap in IPL
and it truly depicts the batting performance of the player.
6

Question 9: List of all the players in KKR.

Command :
SELECT Player_Name
FROM `player`
WHERE Player_no IN(SELECT Player_Id FROM `playermatch` WHERE Team_Id=1)

Output:
Player_Name

SC Ganguly
BB McCullum
RT Ponting
DJ Hussey
Mohammad Hafeez
JH Kallis
MV Boucher
YK Pathan
G Gambhir
RV Uthappa
SB Bangar
WP Saha
LR Shukla
B Lee
PP Chawla
R Vinay Kumar
AB Agarkar
M Kartik
I Sharma
MK Tiwary
R Bhatia
DB Das
MK Pandey
Salman Butt
BJ Hodge

In IPL every player is assigned to a particular team and no player can be a


member of two teams.
Question 10: List of all the indian players who are left handed

Command :
SELECT Player_Name
FROM `player`
WHERE Batting_Hand='Left_Hand'

Output:
Player_Name

SC Ganguly
SB Joshi
PA Patel
ML Hayden
MEK Hussey
SK Raina
JDP Oram
K Goel
KC Sangakkara
Yuvraj Singh
7

SM Katich
IK Pathan
DS Lehmann
RA Jadeja
G Gambhir
S Dhawan
ST Jayasuriya
AM Nayar
S Chanderpaul
AC Gilchrist
WPUJC Vaas
PP Chawla
GC Smith
SS Tiwary
M Kartik

In IPL most of the player is right handed batsman but it also have left handed
batsman particularly from India.

Question 11: List of all the players who are captains.


Command :
SELECT Player_Name
FROM `player`
WHERE Player_no IN (SELECT Player_Id FROM `playermatch` WHERE Is_Captain=1)

Output:
Player_Name

SC Ganguly
BB McCullum
RT Ponting
DJ Hussey
R Draveed
V Kohli
CL White
Z Khan
PA Patel
MS Dhoni
SK Raina
JR Hopes
KC Sangakkara
Yuvraj Singh
SR Watson
SK Warne
G Gambhir
V Sehwag
S Dhawan
SM Pollock
Harbhajan Singh
LRPL Taylor
AC Gilchrist
VVS Laxman
RG Sharma

In every team there is a leader which directs the team in right direction, in
cricket it is a captain who holds this position.

Question 12: List of players who were umpires.


8

Command :
SELECT Player_Name
FROM `player`
WHERE Is_Umpire=1

Output:
Player_Name

Asad Rauf
MR Benson
Aleem Dar
SJ Davis
BF Bowden
IL Howell
DJ Harper
RE Koertzen
BR Doctrove
AV Jayaprakash
BG Jerling
M Erasmus
HDPK Dharmasena
S Asnani
GAV Baxter
SS Hazare
K Hariharan
SL Shastri
SK Tarapore
S Ravi
SJA Taufel
S Das
AM Saheba
PR Reiffel
JD Cloete

The role of umpires is to observe the every action that happens during matches
in detail and take decision accordingly.

Question 13: How many times a team won toss and choose to field first in wankhade
stadium.

Command :
SELECT COUNT(Match_Id)
FROM `match`
WHERE Venue_Name='Wankhede Stadium' AND Toss_Decision='field'

Output:
COUNT(Match_Id)
29

After the toss, the captain of toss winning team was asked to choose to take
either batting first or bowling first.

Question 14: How many matches team id 1 won against team id 2?


9

Command :
SELECT COUNT(Match_Id)
FROM `match`
WHERE Team_Name_Id=2 AND Opponent_Team_Id=1 AND Match_Winner_Id=1

Output:
COUNT(Match_Id)
4

Whether a team is better than the any other particular team is justified by the
no. of times former team wins against the latter team.

Question 15: For how many teams did player id 17 played for in the IPL history?

Command :
SELECT Team_Name
FROM `team`
WHERE Team_Id IN (SELECT DISTINCT Team_Id FROM `playermatch` WHERE Player_Id=17)

Output:
Team_Name

Royal Challengers Bangalore


Chennai Super Kings
Mumbai Indians
Deccan Chargers
Kochi Tuskers Kerala
Sunrisers Hyderabad

Loyalty of any particular player towards any team is judged by his consistency
in that particular team.
Story Findings-
Cricket is a simple game you win or you loose but there is a lot of grey area as well. It is a
battle of nerves as much as it is test of skill. Lot of games in IPL go down to wire, let us see
which teams and players had withstand pressure and win games, all the questions are
answered by analysing the IPL database such as –

 No. of matches played in different cities,different stadiums.


 Is winning toss really an advantage?
 Margins of victories in IPL.
 Batsman with top strike rates
 Player retention natures of the team.
10

You might also like