SQL + Tableau
SQL + Tableau
Tools Used
Data Set: Fabricated database from 365 Careers made to practice SQL queries
Data Manipulation: MySQL using MySQL Workbench
Dashboard: Tableau Public
Process
Imported the database into MySQL Workbench
Wrote and executed SQL queries to prepare CSV files to import into Tableau
Imported CSV files into Tableau and created visualizations in worksheets
Combined visualizations into dashboard
Note: It was required to use CSV files instead of using a Tableau SQL connector since Tableau Public does not support most data connectors.
Database Schema
Employee Count by Gender
Goal: Create a visualization that provides a breakdown between the male and female employees working in the company each year, starting from 1990.
SQL Query:
Tableau:
Imported a CSV of this result
Created bar graph by using Calendar Year in Column and Sum(num_of_employees) as rows
Changed Sum(num_of_employees) to be a running total to show cumulative employee growth
Formatted colors, text, font, legend, and axis for the chart
Manager Count by Gender
Goal: Compare the number of male managers to the number of female managers from different departments for each year, starting from 1990.
SQL Query:
Tableau:
Imported a CSV of this result
Created area chart by using Calendar Year in Column and Sum(active) as rows
Added filter for departments
Formatted colors, text, font, legend, and axis for the chart
Average Salary by Gender
Goal: Compare the average salary of female versus male employees in the entire company until year 2002, and add a filter allowing you to see that per each department.
SQL Query:
Tableau:
Imported a CSV of this result
Created line chart by using Calendar Year in Column and avg(salary) as rows
Added filter for departments
Formatted colors, text, font, legend, and axis for the chart
Average Salary by Gender & Department (Outliers Removed)
Goal: Create an SQL stored procedure that will allow you to obtain the average male and female salary per department within a certain salary range. Let this range be defined by two values the user can insert when calling the procedure.
Finally, visualize the obtained result-set in Tableau as a double bar chart.
SQL Query:
Tableau:
Imported a CSV of this result
Created double bar chart by using Department Name and Gender in Column and avg(salary) as rows
Formatted colors, text, font, legend, and axis for the chart
Dashboard Creation
Tableau:
Combined all the visualizations into one dashboard
Made sure that the department and gender filters will work on every chart