This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Highest wicket takers in IPL (2008-2016) | |
SELECT C.Player_Name , COUNT(*) As 'Wickets_Taken' | |
FROM Ball_by_Ball A | |
INNER JOIN Wicket_Taken B | |
ON CONCAT(A.Match_Id,A.Over_Id,A.Ball_Id,A.Innings_No) | |
= CONCAT(B.Match_Id,B.Over_Id ,B.Ball_Id ,B.Innings_No) | |
INNER JOIN Player C | |
ON A.Bowler = C.Player_Id | |
WHERE B.Kind_Out NOT IN (3,5,9) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Five wicket hauls in IPL (2008-2016) | |
SELECT A.Match_Id,C.Player_Name , COUNT(*) As 'Wickets_Taken' | |
FROM Ball_by_Ball A | |
INNER JOIN Wicket_Taken B | |
ON CONCAT(A.Match_Id,A.Over_Id,A.Ball_Id,A.Innings_No) | |
= CONCAT(B.Match_Id,B.Over_Id ,B.Ball_Id ,B.Innings_No) | |
INNER JOIN Player C | |
ON A.Bowler = C.Player_Id | |
WHERE B.Kind_Out NOT IN (3,5,9) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Bowlers with most Five wicket hauls in IPL (2008-2016) | |
WITH CTE(Match_Id, Player_Name , Wickets_taken) | |
As | |
( | |
SELECT A.Match_Id,C.Player_Name , COUNT(*) As 'Wickets_Taken' | |
FROM Ball_by_Ball A | |
INNER JOIN Wicket_Taken B | |
ON CONCAT(A.Match_Id,A.Over_Id,A.Ball_Id,A.Innings_No) | |
= CONCAT(B.Match_Id,B.Over_Id ,B.Ball_Id ,B.Innings_No) | |
INNER JOIN Player C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Players involved in most IPL Match Victories | |
SELECT C.Player_Name , COUNT(*) As 'Most_IPL_Victories' | |
FROM Match A | |
INNER JOIN Player_Match B | |
ON CONCAT(A.Match_Id,A.Match_Winner) | |
= CONCAT(B.Match_Id,B.Team_Id) | |
INNER JOIN Player C | |
ON B.Player_Id = C.Player_Id | |
GROUP BY C.Player_Name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Important metrics in IPL ( 2008 - 2016 ) | |
SELECT 'Matches' As Dimension , COUNT(*) As 'Measure' | |
FROM Match | |
UNION ALL | |
SELECT 'Extra_Runs' As Dimension , SUM(Extra_Runs.Extra_Runs) As 'Measure' | |
FROM Extra_Runs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Players with Most Sixes's in IPL ( 2008 - 2016 ) | |
SELECT C.Player_Name ,COUNT(*) As 'Sixes' | |
FROM Ball_by_Ball A | |
INNER JOIN Batsman_Scored B | |
ON CONCAT(A.Match_Id,A.Over_Id,A.Ball_Id,A.Innings_No) | |
= CONCAT(B.Match_Id,B.Over_Id,B.Ball_Id,B.Innings_No) | |
INNER JOIN Player C | |
ON A.Striker = C.Player_Id | |
INNER JOIN Match D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Players with Most Dot_Ball's in IPL ( 2008 - 2016 ) | |
SELECT C.Player_Name ,COUNT(*) As 'Dot_Ball' | |
FROM Ball_by_Ball A | |
INNER JOIN Batsman_Scored B | |
ON CONCAT(A.Match_Id,A.Over_Id,A.Ball_Id,A.Innings_No) | |
= CONCAT(B.Match_Id,B.Over_Id,B.Ball_Id,B.Innings_No) | |
INNER JOIN Player C | |
ON A.Striker = C.Player_Id | |
INNER JOIN Match D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Players with Most Single's in IPL ( 2008 - 2016 ) | |
SELECT C.Player_Name ,COUNT(*) As 'Single' | |
FROM Ball_by_Ball A | |
INNER JOIN Batsman_Scored B | |
ON CONCAT(A.Match_Id,A.Over_Id,A.Ball_Id,A.Innings_No) | |
= CONCAT(B.Match_Id,B.Over_Id,B.Ball_Id,B.Innings_No) | |
INNER JOIN Player C | |
ON A.Striker = C.Player_Id | |
INNER JOIN Match D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Players with Most three's in IPL ( 2008 - 2016 ) | |
SELECT C.Player_Name ,COUNT(*) As 'Three' | |
FROM Ball_by_Ball A | |
INNER JOIN Batsman_Scored B | |
ON CONCAT(A.Match_Id,A.Over_Id,A.Ball_Id,A.Innings_No) | |
= CONCAT(B.Match_Id,B.Over_Id,B.Ball_Id,B.Innings_No) | |
INNER JOIN Player C | |
ON A.Striker = C.Player_Id | |
INNER JOIN Match D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Players with Most two's in IPL ( 2008 - 2016 ) | |
SELECT C.Player_Name ,COUNT(*) As ' Two' | |
FROM Ball_by_Ball A | |
INNER JOIN Batsman_Scored B | |
ON CONCAT(A.Match_Id,A.Over_Id,A.Ball_Id,A.Innings_No) | |
= CONCAT(B.Match_Id,B.Over_Id,B.Ball_Id,B.Innings_No) | |
INNER JOIN Player C | |
ON A.Striker = C.Player_Id | |
INNER JOIN Match D |