Write a SQL statement that will list for each customer whose billing address is on a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a SQL statement that will list for each customer whose billing address is on a road: the customer's first name, the customer's last name, and how many orders the customer has placed. Use first name, last name, and numb orders for the column headings. ww www m addresses address_id INT customer_id INT line 1 VARCHAR(60) line 2 VARCHAR(60) city VARCHAR(40) > state VARCHAR(2) zip_code VARCHAR(10) phone VARCHAR(12) H₂ disabled TINYINT(1) Indexes ▶ HO- + customers customer_id INT email_address VARCHAR(255) 1 ◆password VARCHAR(60) 1 HH first_name VARCHAR(60). HE last_name VARCHAR(60) shipping_address_id INT ◆billing_address_id INT Indexes I orders order_id INT customer_id INT order_date DATETIME →ship_amount DECIMAL (10,2) tax_amount DECIMAL (10,2) - ship_date DATETIME →ship_address_id INT O Indexes card_type VARCHAR (50) card_number CHAR(16) card_expires CHAR (7) billing_address_id INT Indexes categories category_id INT category_name VARCHAR(255) FI+ ➤ H+ order_items item_id INT order_id INT product_id INT item_price DECIMAL (10,2) discount_amount DECIMAL (10,2) quantity INT Indexes 1 products product_id INT category_id INT >product_code VARCHAR(10) product_name VARCHAR(255) description TEXT list price DECIMAL (10,2) discount_percent DECIMAL (10,2) date_added DATETIME Indexes Write a SQL statement that will list for each customer whose billing address is on a road: the customer's first name, the customer's last name, and how many orders the customer has placed. Use first name, last name, and numb orders for the column headings. ww www m addresses address_id INT customer_id INT line 1 VARCHAR(60) line 2 VARCHAR(60) city VARCHAR(40) > state VARCHAR(2) zip_code VARCHAR(10) phone VARCHAR(12) H₂ disabled TINYINT(1) Indexes ▶ HO- + customers customer_id INT email_address VARCHAR(255) 1 ◆password VARCHAR(60) 1 HH first_name VARCHAR(60). HE last_name VARCHAR(60) shipping_address_id INT ◆billing_address_id INT Indexes I orders order_id INT customer_id INT order_date DATETIME →ship_amount DECIMAL (10,2) tax_amount DECIMAL (10,2) - ship_date DATETIME →ship_address_id INT O Indexes card_type VARCHAR (50) card_number CHAR(16) card_expires CHAR (7) billing_address_id INT Indexes categories category_id INT category_name VARCHAR(255) FI+ ➤ H+ order_items item_id INT order_id INT product_id INT item_price DECIMAL (10,2) discount_amount DECIMAL (10,2) quantity INT Indexes 1 products product_id INT category_id INT >product_code VARCHAR(10) product_name VARCHAR(255) description TEXT list price DECIMAL (10,2) discount_percent DECIMAL (10,2) date_added DATETIME Indexes
Expert Answer:
Related Book For
Concepts of Database Management
ISBN: 978-1285427102
8th edition
Authors: Philip J. Pratt, Mary Z. Last
Posted Date:
Students also viewed these programming questions
-
An iron column of the annular cross-section has an outer diameter of 200 mm and is subjected to a force of 75 kN. Find the thickness of the wall if the allowable compressive stress is 10 Mpa.
-
Regarding HR and business friction, we may claim that : A. A reason for friction is that the individuals responsible for implementing the strategy refuse to follow orders. B. The company's Human...
-
1- (25 pts) The nodal coordinates and the nodal displacements for some plane stress elastic element is listed in the following problem. The element is 0.1 m thick. The coordinates and displacements...
-
Determine the degrees of freedom under the following conditions: (a) Tl-20 wt% Pb at 325 C and 400 C; (b) Tl-40 wt% Pb at 325 C and 400 C; (c) Tl-90 wt% Pb at 325 C and 400 C. Refer to the phase...
-
The following selected information is available for AB Volvo, headquartered in Sweden, for three fiscal years (in SEK [Swedish krona] millions): Instructions (a) Calculate the current ratio, gross...
-
Wade NV has 150,000 ordinary shares of outstanding. In 2019, the company reports income before income tax of 1,210,000. Additional transactions not considered in the 1,210,000 are as follows. 1. In...
-
If the yield to maturity on a one-year bond is 8 per cent and the expected spot rate on a one-year bond, beginning in one years time, is 7 per cent, what will be the yield to maturity on a two-year...
-
Pacelli Company issued 10-year, 10% bonds with a par value of $1,000,000 on January 2, 2010, for $940,000. Interest is paid semiannually on June 30 and December 31. On December 31, 2011, $800,000 of...
-
A firm's dividends have grown over the last several years. 4 years ago the firm paid a dividend of $2. Yesterday it paid a dividend of $5. What was the average annual growth rate of dividends for...
-
Chow, a PA, is assisting his client, Western Resources Inc., a closely held company, that is seeking to secure a new line of credit from a local bank. Chow has performed a review of the companys...
-
Sandhill Co. entered into these transactions during May 2022, its first month of operations. 1. Stockholders invested $37,000 in the business in exchange for common stock of the company. 2. Purchased...
-
How can a poor SWOT analysis affect strategic planning?
-
What are the basic factors involved in deciding whether to use standardization or customization?
-
In 2012, Peugeot announced that it would shutter its factory in Aulnay-sous-Blois, costing 8,000 workers their jobs. President Hollande immediately denounced the proposed downsizing and pressured the...
-
Italys old age dependency ratio in 2012 was 0.28; by 2050, it is expected to rise to 0.68. Would you be willing to build a new factory in Italy in 2050? Will Italian teenagers in 2050 be motivated to...
-
What are the three basic pricing policies?
-
do victims get a say in whether a plea bargain should be offered in a particular case? Please explain
-
Complete problem P10-21 using ASPE. Data from P10-21 Original cost ................................................................. $7,000,000 Accumulated depreciation...
-
You need to delete the Order Line table from the TAL Distributors database. Will the following command work? Why or why not?
-
In the following exercises, you will use the data in the Solmaris Condominium Group database shown in Figures 1-21 through 1-25 in Chapter 1. (If you use a computer to complete these exercises, use a...
-
Describe the results of the division process in relational algebra.
-
Because you own the common stock of Jacob Corporation, a paper manufacturer, you decide to analyze the firm's performance for the most recent year. The following data are taken from the firm's latest...
-
Quarterly data are presented below for Company A and Company B. One of these companies is Gibson Greetings, Inc., which manufactures and sells greeting cards. The other company is Hon Industries,...
-
Adams Plastics, Inc., manufactures various plastic and synthetic products. Financial statement data for the firm follow: Required a. Using the given data, calculate items 1 through 8 below for 2019....
Study smarter with the SolutionInn App