Assignment 3 Overview
As with Microsoft Excel, knowledge and use of relational databases is an important skill for a data analyst. Often large amounts of data are stored in relational databases and a data analyst needs to understand how to combine data from various tables and export those data into a format that can be used for analysis. That is done using the SQL language. For this course, we will use the MySQL Workbench interface to learn how to execute SQL commands and output data for analysis from the textbook relational database.
Assignment 3 Instructions
1. Read Chapter 5
2. For this assignment, use MySQL Workbench to extract data from the textbook database, export those data as a CSV file, and then submit that file to the classroom. The textbook database was attached to MySQL Workbench in Module 1 during the installation procedures.
3. Specifically, SELECT the following columns:
a. hospital_general_information.facility_name,
b. hospital_general_information.city,
c. hospital_general_information.state, hospital_associated_infection.measure_name,
d. hospital_associated_infection.score
FROM the table hospital_general_information
4. Then JOIN the table hospital_associated_infection ON columns hospital_general_information.faciltiy_id from table 1 with hospital_associated_infection.facility_id from table 2
5. Finally, use the WHERE statement to include only records from FL. That statement will look like: WHERE hospital_general_information.state=’FL’ Use the example in Figure 5.19 if you have issues formatting the SQL commands.
6. Don’t limit the number of records (go to Query > Limit Rows to change the setting to “Don’t Limit”). After you have successfully run the SQL commands against the textbook database, export the data by going to QUERY > Export Results