This project presents a structured analysis of Major League Baseball (MLB) data using SQL and visualized through Tableau dashboards. The analysis spans player statistics, school affiliations, and team salary trends, offering multi-perspective insights into the MLB landscape.
The SQL and dashboard components are organized into four key areas:
Part | Topic | Key Analyses |
---|---|---|
I | School Analysis | • Join schools + school_details • Count schools by decade • Top 5 schools overall • Top 3 schools per decade |
II | Salary Analysis | • View salary data • Top 20% teams by average spend • Cumulative salary over years • Year teams surpassed $1B |
III | Player Career Analysis | • Age at debut and final game • Career length in years • Start and end teams • 10+ years on same team |
IV | Player Comparison Analysis | • Players with shared birthdays • Batting style breakdown by team • Debut height/weight by decade • Decade-over-decade differences |
final_project.sql
: Main SQL script containing all structured queries and insights.assets/
folder:MLB_Salary.gif
: Animated preview of the salary dashboard.MLB_Players.gif
: Animated preview of the player analysis dashboard.MLB_School.gif
: Animated preview of the school-level dashboard.Major League Baseball Analysis.twb
: Tableau Workbook file containing all dashboards.
Note: Tableau dashboards were created using Tableau Desktop and are not hosted on Tableau Public due to publishing limitations.
Spending, Trends & Top Earners
- Top 10 highest-paid players
- KPI cards on salary spending
- Salary trend by year and team
Debuts, Longevity & Profiles
- Career spans across decades
- Player debut patterns
- KPI cards and highlight metrics
School Contributions & Legacy
- Player origins by school and state
- Total salary by school
- Career duration and performance funnels
- MySQL
- Tableau Desktop (for dashboard creation)
- Maven Analytics MLB dataset
- SQL window functions, CTEs, aggregates
- Analytical SQL for real-world data exploration
- Use of
ROW_NUMBER
,NTILE
,LAG
, and other advanced functions - Data summarization, blending, and transformation
- Custom dashboard storytelling using Tableau
To explore or reproduce the analysis:
- Import the database
maven_advanced_sql
into your SQL environment. - Run the queries from
final_project.sql
step by step. - Open
Major League Baseball Analysis.twb
in Tableau Desktop to view dashboards. - Preview dashboards from the GIFs in the
assets
folder.
This project uses data from the Maven Analytics Advanced SQL course. It was created for educational and portfolio purposes.