An end-to-end SQL data analysis project on 17 seasons of IPL cricket data using PostgreSQL. This project analyzes 1,095 matches and 260,920 ball-by-ball deliveries to uncover strategic insights about team performance, player statistics, and winning patterns.
- PostgreSQL 17
- pgAdmin 4
- GitHub
- Source: Kaggle β IPL Complete Dataset (2008β2024)
- matches.csv β 1,095 matches
- deliveries.csv β 260,920 ball-by-ball records
- Which team has won the most IPL matches across all seasons?
- Which venue has hosted the most matches?
- How many matches were won by batting first vs fielding first?
- Which team has the best win % when they win the toss?
- Which batsman scored the most runs in death overs (17β20)?
- Which bowler has the best economy rate in powerplay overs (1β6)?
- Which teams perform best in home venues vs away venues?
- Rank batsmen by total runs scored in each season using RANK() OVER
- Find players whose batting average improved every consecutive season
- Win % trend of each team year-over-year using LAG()
- Which bowler has taken the most wickets in Super Over situations?
- Top 5 clutch batsmen in high chase matches (180+ target)
- What combination of toss decision and batting order gives the highest win probability?
- Mumbai Indians are the most successful team with 144 wins
- Eden Gardens is the most hosted venue with 77 matches
- Teams choosing to field first win 53.55% of matches vs 45.27% batting first
- Gujarat Titans have the best toss-to-win conversion at 63.64%
- MS Dhoni is the greatest death over batsman with 19,566 runs
- Best winning combination: Win toss β Choose to field β Chase successfully (33.88%)
- SELECT, WHERE, GROUP BY, ORDER BY, HAVING
- JOINs, Subqueries, UNION ALL
- CTEs (WITH clause)
- Window Functions: RANK(), LAG(), PARTITION BY
- CASE WHEN, NULLIF, ROUND
- CAST, Regex filtering