Skip to content

Using SQL for data modeling, engineering and analysis on an employee database from the 1980s and 1990s, performing complex queries on the data.

Notifications You must be signed in to change notification settings

randiesinclair/SQL-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Challenge

This project is focused on using SQL to perform data modeling, data engineering, and data analysis on an employee database from the 1980s and 1990s. The data was provided in the form of six CSV files.

Data Modeling

  • Inspect the CSV files
  • Sketch an Entity Relationship Diagram of the tables using a tool like QuickDBD. (pictured below)

image

Data Engineering

  • Use the provided information to create a table schema for each of the six CSV files.
  • Specify the data types, primary keys, foreign keys, and other constraints.
  • Verify that the primary key columns are unique.
  • Create the tables in the correct order to handle the foreign keys.
  • Import each CSV file into its corresponding SQL table.

sql1

Data Analysis

  • List the employee number, last name, first name, sex, and salary of each employee.
  • List the first name, last name, and hire date for the employees who were hired in 1986.
  • List the manager of each department along with their department number, department name, employee number, last name, and first name.
  • List the department number for each employee along with that employee’s employee number, last name, first name, and department name.
  • List first name, last name, and sex of each employee whose first name is Hercules and whose last name begins with the letter B.
  • List each employee in the Sales department, including their employee number, last name, and first name.
  • List each employee in the Sales and Development departments, including their employee number, last name, first name, and department name.
  • List the frequency counts, in descending order, of all the employee last names.

sql2

Technical Skills Required

  • SQL
  • Data modeling
  • Data engineering
  • Data analysis

Project Parameters

  • Entity Relationship Diagram is included or table schemas provided for all tables
  • All required columns are defined for each table
  • Columns are set to the correct data type
  • Primary keys set for each table
  • Correctly references related tables
  • Tables are correctly related using Foreign Keys
  • Correctly uses NOT NULL condition on necessary columns
  • Accurately defines value length for columns
  • List the employee number, last name, first name, sex, and salary of each employee
  • List the first name, last name, and hire date for the employees who were hired in 1986
  • List the manager of each department along with their department number, department name, employee number, last name, and first name
  • List the department number for each employee along with that employee’s employee number, last name, first name, and department name
  • List first name, last name, and sex of each employee whose first name is Hercules and whose last name begins with the letter B
  • List each employee in the Sales department, including their employee number, last name, and first name
  • List each employee in the Sales and Development departments, including their employee number, last name, first name, and department name
  • List the frequency counts, in descending order, of all the employee last names

Final Analysis

1.List the employee number, last name, first name, sex, and salary of each employee.

sqlQ1

2.List the first name, last name, and hire date for the employees who were hired in 1986.

sqlQ2

3. List the manager of each department along with their department number, department name, employee number, last name, and first name.

sqlQ3

4. List the department number for each employee along with that employee’s employee number, last name, first name, and department name.

sqlQ4

5. List first name, last name, and sex of each employee whose first name is Hercules and whose last name begins with the letter B.

sqlQ5

6. List each employee in the Sales department, including their employee number, last name, and first name.

sqlQ6

7. List each employee in the Sales and Development departments, including their employee number, last name, first name, and department name.

sqlQ7

8. List the frequency counts, in descending order, of all the employee last names (that is, how many employees share each last name).

sqlQ8

About

Using SQL for data modeling, engineering and analysis on an employee database from the 1980s and 1990s, performing complex queries on the data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published