Question: Write basic queries against imported tables to organize and analyze targeted data. A. For each query, include a screenshot of the query and its

Write basic queries against imported tables to organize and analyze targeted data. A. For each query, include mysql> SELECT COUNT(*) -> FROM Collaborators INNER JOIN Orders on Collaborators.Customer_ID = 

Write basic queries against imported tables to organize and analyze targeted data. A. For each query, include a screenshot of the query and its output. You should also include a 1- to 3-sentence description of the output. B. Write an SQL query that returns the count of orders for customers located only in the city of 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. How many records were returned? C. Write an SQL query to select all of the customers located in the state of Massachusetts. i. Use a WHERE clause to limit the number of records in the customers table to only those that are located in Massachusetts. ii. Record an answer to the following question: How many records were returned? mysql> SELECT COUNT(*) -> FROM Collaborators INNER JOIN Orders on Collaborators.Customer_ID = Orders.customer_ID -> WHERE UPPER (Collaborators.city) = 'Framingham' AND UPPER (Collaborators.state) = 'MASSACHUSE TTS'; ERROR 1054 (42S22): Unknown column 'Collaborators.Customer_ID' in 'on clause mysql> SELECT COUNT(*) -> FROM Customers INNTER JOIN on Customers. Customer_ID = Order.customer_ID -> WHERE UPPER (Customers.city)= 'Framingham' AND UPPER (Customers.state) = 'MASSACHUSETTS'; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to you r MySQL server version for the right syntax to use near 'on Customers. Customer_ID = Order.customer ID WHERE UPPER (Customers.city)= 'Frami' at line 2 mysql> SELEC COUNT(*) FROM Customers -> INNER JOIN Orders on Customers. CustomerID = Order. Customer ID = 'MASSACHUSETTS'; -> WHERE UPPER (Customers.city) = "FRAMINGHAM" AND UPPER (Customers.state) ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to you r MySQL server version for the right syntax to use near 'SELEC COUNT(*) FROM Customers INNER JOIN Orders on Customers. CustomerID = Order.' at line 1 mysql>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

A To count the number of orders for customers located only in the city of Framingham Massachusett... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!