Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL - Write a SELECT statement that returns three columns: email_address, order_id, and the order total for each customer. To do this, you can group

SQL - Write a SELECT statement that returns three columns: email_address, order_id, and the order total for each customer. To do this, you can group the result set by the email_address and order_id columns. In addition, you must calculate the order total from the columns in the Order_Items table. Write a second SELECT statement that uses the first SELECT statement in its FROM clause. The main query should return two columns: the customers email address and the largest order for that customer. To do this, you can group the result set by the email_address. CUSTOMERS TABLE: CUSTOMER_ID, EMAIL_ADDRESS, PASSWORD, FIRST_NAME, LAST_NAME, SHIPPING_ADDRESS_ID, BILLING_ADDRESS_ID ORDER_ITEMS TABLE: ITEM_ID, ORDER_ID, PRODUCT_ID, ITEM_PRICE, DISCOUNT_AMOUNT, QUATITY ORDERS TABLE: ORDER_ID, CUSTOMER_ID, ORDER_DATE, SHIP_AMOUNT, TAX_AMOUNT, SHIP_DATE_SHIP_ADDRESS_INFO, CARD_TYPE, CARD_NUMBER, CARD_EXPIRES, BILLING_ADDRESS_ID

PRIOR ANSWERS DID NOT WORK FOR ME, DO NOT COPY AND PASTE ANSWERS FROM SAME QUESTION PLEASE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics Of A Networked World Semantics For Grid Databases First International Ifip Conference Icsnw 2004 Paris France June 2004 Revised Selected Papers Lncs 3226

Authors: Mokrane Bouzeghoub ,Carole Goble ,Vipul Kashyap ,Stefano Spaccapietra

2004 Edition

3540236090, 978-3540236092

More Books

Students also viewed these Databases questions