DAD 220 Analysis and Summary Template - Taylor

.docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

220

Subject

Mechanical Engineering

Date

Feb 20, 2024

Type

docx

Pages

8

Uploaded by haleytaylor624

Report
DAD 220 Analysis and Summary Template Replace the bracketed text in this template with your responses and any supporting screenshots. Then submit it to the Module Five Activity for grading and feedback. Rename this document by adding your last name to the file name before you submit. Updated permissions in Codio using chmod +x change_perm.sh and ./change_perm.sh from Module 3. Created table names PartsMaintence with the columns named VehicleID, State, Repair ,Reason, YEAR , Make and BodyType using the database taylor. CREATE TABLE PartsMaintence (VehicleID VARCHAR(30), State VARCHAR(2), Repair VARCHAR(50), Reason VARCHAR(50), YEAR INT, Make VARCHAR(30), BodyType VARCHAR(50));
Corrected Spelling of the table name. Loaded data from FleetMaintenanceRecords.csv into the table PartsMaintenance. LOAD DATA INFILE '/home/codio/workspace/FleetMaintenanceRecords.csv' INTO TABLE PartsMaintenance FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 ROWS;
1. Analyze the data you’ve been provided with to identify themes : a. Which parts are being replaced most? The part that is being replaced the most is the Fuel Tank with a total of 95 total repairs. The second highest replaced part is Tire replacement at 66 and then Windshield replacement at 63. The list goes on in descending order to show the highest number of repairs first and the lowest as the last. Located information using the command: SELECT Repair AS PART_REPAIR, COUNT(*) AS NUMBER_OF_REPAIRS FROM PartsMaintenance GROUP BY PART_REPAIR ORDER BY NUMBER_OF_REPAIRS DESC; b. Is there a region of the country that experiences more part failures and replacements than others? i. Identify region: The region with the most part failures and replacements is the Midwest with a total of 234. This information was located by using the UNION function to join several SELECT statements specific for each region. The list goes on in descending order to show the highest number of repairs per region first and the lowest as the last. Located information using the command: SELECT 'Southwest' AS REGION, COUNT(*) AS NUMBER_OF_REPAIRS FROM PartsMaintenance WHERE State IN ('AZ', 'NM', 'TX', 'OK') UNION SELECT 'Southeast' AS REGION, COUNT(*) AS NUMBER_OF_REPAIRS FROM PartsMaintenance WHERE State IN ('AK', 'LA', 'MS', 'AL', 'GA', 'FL', 'KY', 'TN', 'SC', 'NC', 'VA', 'WV', 'DE', 'MD') UNION SELECT 'Northeast' AS REGION, COUNT(*) AS NUMBER_OF_REPAIRS FROM PartsMaintenance WHERE State IN ('PA', 'NJ', 'NY', 'CT', 'RI', 'MA', 'VT', 'NH', 'ME') UNION SELECT 'Midwest' AS
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help