DAD 220 Module Four Major Activity

.docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

DAD-220-X3

Subject

Mechanical_engineering

Date

Jun 4, 2024

Type

docx

Pages

9

Uploaded by MasterButterflyPerson397

DAD 220 Module Four Major Activity Template Federico Castellanos 6/2/2024 Overview Complete these steps as you work through the directions for this activity. Replace the bracketed text with your screenshots and brief explanations of the work the screenshots capture. Size each screenshot and its explanation to fit approximately one-quarter of the page with the description written below the screenshot. Review the Template Screenshot Example linked in the guidelines and rubric for this assignment to see how screenshots for your assignment should look. Before you begin, follow steps one through four from the Module Three Major Activity Guidelines and Rubric only to generate tables for this assignment. Then follow the steps below to complete the activity. Organize and Analyze Data in Tables 1. Import the data from each file into tables. A. Use the Quantigration RMA database, the three tables you created, and the three CSV files preloaded into Codio. B. Use the import utility of your database program to load the data from each file into the table of the same name. You'll perform this step three times, once for each table. i. Reference notes for this step: Import the CSV File into the MySQL table. Use the following line terminators when importing: \r\n. Do not use IGNORE 1 LINES for data that does not have column headers in the first row. C. Provide the SQL commands you ran against MySQL to complete this step successfully.
EXPLANATION: In this picture, I started by using the ‘ mysql’ command in order to run the code asked in this assignment. It is seen that I have forgotten to select the Quantigration RMA by using ‘ use QuantigrationRMA ;’ I then used the import utility tool to load the data onto the code to perform this step successfully three different times. 2. Write basic queries against imported tables to organize and analyze targeted data. For each query you run in this step, include a screenshot of the query and its output. Also, include a one- to three-sentence explanation. A. Write a SQL query that returns the count of orders for customers located only in Framingham, Massachusetts. i. This query will use a table join between the Customers and Orders tables. The query will also use a WHERE clause. ii. Record an answer to the following question: How many records were returned?
EXPLANATION: I have ran the following in order to get this result: “ select * FROM Customers INNER JOIN Orders ON Orders.CustomerID = Customers.CustomerID where City = 'FRAMINGHAM' AND State = 'MASSACHUSETTS'\G”. At the end, the total number of records that were returned were 505. To organize the data into a neater output, I ended my command with \G instead of; B. Write a SQL query to select all of the customers located in Massachusetts. i. Use a WHERE clause to limit the number of records in the Customers table to only those who are located in Massachusetts. ii. Record an answer to the following question: How many records were returned?
EXPLANATION: 982 rows of records were returned. As seen in the code written: “select * FROM Customers where State = 'Massachusetts'\G;” The ‘INNER JOIN’ has been removed as well as ‘City =’ as neither were asked for this section. I have once again used ‘\G;’ To organize my response C. Write a SQL query to insert four new records into the Orders and Customers tables using the data below. Customers Table CustomerID FirstName Lastname StreetAddress City State ZipCode Telephone 100004 Luke Skywalker 17 Maiden Lane New York NY 10222 212-555-1234 100005 Winston Smith 128 Sycamore Street Greensboro NC 27401 919-555-6623 100006 MaryAnne Jenkins 2 Coconut Way Jupiter FL 33458 321-555-8907 100007 Janet Williams 58 Redondo Beach Blvd Torrence CA 90501 310-555-5678
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