Write basic queries against imported tables to organize and analyze targeted data. A. For each query,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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> 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>
Expert Answer:
Answer rating: 100% (QA)
A To count the number of orders for customers located only in the city of Framingham Massachusett... View the full answer
Related Book For
Using Microsoft Excel and Access 2016 for Accounting
ISBN: 978-1337109048
5th edition
Authors: Glenn Owen
Posted Date:
Students also viewed these databases questions
-
why each financial ratio supports the decision to enter the cloud computing market?please explain it in detail.
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
You have been employed to create program to assist the manager of a coffee shop. You decide to make a prototype application in Java to show what you can do, and to be able to ask the manager what...
-
H. Brown (Portsmouth) Ltd produces a range of central heating systems for sale to builders merchants. As a result of increasing demand for the businesss products, the directors have decided to expand...
-
Given an appropriate set of scalar type definitions for the suppliers-parts-projects database do not attempt to write the relvar definitions.
-
Do you think America as it stands currently is an organic or mechanical society? Does this configuration create problems for the organization of society or make it difficult to solve social problems...
-
Consider the multiple linear regression model fit to the rental price data in Problem 3.42. Problem 3.42 Table B.24 contains data on median family home rental price and other data for 51 US cities....
-
A plate-fin heat exchanger is used to condense a saturated refrigerant vapor in an air-conditioning system. The vapor has a saturation temperature of 45?C and a condensation rate of 0.015 kg/s is...
-
Define moral hazard. Does it apply only to consumers? If your demand for health care services is more or less elastic, will there be more or less (potential) moral hazard effect for a given...
-
Provide the missing information. (Always use cell references and formulas where appropriate to receive full credit. If you copy/paste from the Instructions tab you will be marked wrong.) Item Case 1...
-
Gary has a 15 year mortgage on his house his monthly principal and interest payment is $1373 his annual insurance is $1388 and his annual property taxes are $1996 find his adjusted monthly payment of...
-
What is the difference between eco-efficiency and eco-balance?
-
Under what circumstances is an avoidable manufacturing cost relevant in the make-or-buy decision?
-
What suggestions would you give to a salesperson who is planning to meet a new prospect who displays the Reflective communication style?
-
Briefly discuss the relationship between product and service value and environmental influence.
-
Identify the causes of the difference between the ending cash balance in a business' records and the ending cash balance reported on its bank statement.
-
QUESTION 3 In a centrifugal pump, the liquid enters the pump (a) at the top (b) at the bottom (c) at the center (d) from sides (e) none of the above. O at the center at the bottom no answer is right...
-
What are the key dimensions of critical thinking 2. Watch the NBC Learn video on Diet Scams. What types of claims are made in this video Are they valid Elaborate on your responses. Discuss this video...
-
Modify the Products form by changing the Category ID text box control to a list box control that lists the choices as A, B, C, D, E, or F. Save the form as Ch 12 Assignment 2. Print the newly created...
-
Which ratios are usually formatted as percentages?
-
Identify the five variables in present value problems.
-
A \(40-\mathrm{cm}-\) long tube has a \(40-\mathrm{cm}-\) long insert that can be pulled in and out, as shown in Figure P16.59. A vibrating tuning fork is held next to the tube. As the insert is...
-
The width of a particular microwave oven is exactly right to support a standing-wave mode. Measurements of the temperature across the oven show that there are cold spots at each edge of the oven and...
-
A \(12 \mathrm{~kg}\) hanging sculpture is suspended by a \(90-\mathrm{cm}-\) long, \(5.0 \mathrm{~g}\) steel wire. When the wind blows hard, the wire hums at its fundamental frequency. What is the...
Study smarter with the SolutionInn App