ERD drawn out to show connections across tables
snapshot preview of tables in PgAdmin
SQL Query retrieving employee number, last name, first name, sex, and salary
SQL Query retrieving most common last names (by descending count)
SQL Query retrieving all employee numbers, first names, and last names within the department of Sales
It’s a beautiful spring day, and it’s been two weeks since you were hired as a new data engineer at Pewlett Hackard. Your first major task is a research project on employees of the corporation from the 1980s and 1990s. All that remains of the database of employees from that period are six CSV files.
In this assignment, you will design the tables to hold data in the CSVs, import the CSVs into a SQL database, and answer questions about the data. In other words, you will perform data modeling, data engineering, and data analysis.
Once you have a complete database, perform these steps:
-
List the following details of each employee: employee number, last name, first name, sex, and salary.
-
List first name, last name, and hire date for employees who were hired in 1986.
-
List the manager of each department with the following information: department number, department name, the manager's employee number, last name, first name.
-
List the department of each employee with the following information: employee number, last name, first name, and department name.
-
List first name, last name, and sex for employees whose first name is "Hercules" and last names begin with "B."
-
List all employees in the Sales department, including their employee number, last name, first name, and department name.
-
List all employees in the Sales and Development departments, including their employee number, last name, first name, and department name.
-
List the frequency count of employee last names (i.e., how many employees share each last name) in descending order.
Mockaroo, LLC. (2021). Realistic Data Generator. https://www.mockaroo.com/
© 2022 Trilogy Education Services, a 2U, Inc. brand. All Rights Reserved.