Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For each question write the question, SQL script and the output. Include all three in a notepad or word document. Do not include screen shots.

For each question write the question, SQL script and the output. Include all three in a notepad or word document.  Do not include screen shots. Know how to cut and paste from the SQLplus screen.

customers

custIDcustLNamecustFNameDateofBirthcustCity
C1AttenweilerShannon10-Jul-1987Florence
C2MarksburyFaisal25-Dec-1965Blue Ash
C3O'ConnellJoseph12-Feb-1976West Chester
C4OwenMeghan11-Mar-1982Loveland
C5SullivanSean19-Nov-1981Batavia
C6WeaverJohn21-Jan-1963Dayton
C7AlghanemKelli22-Apr-1972Newport
C8BallhausWilliam6-Oct-1977Fort Thomas

 

Orders

orderIDorderDateAmountcustID
11111-Mar-2013234.45C1
11211-Mar-2013962.89C3
11312-Mar-2013734.46C4
11413-Mar-2013393.76C5
11513-Mar-2013314.34C2
11613-Mar-2013733.23C4
11716-Mar-2013678.89C1
11816-Mar-2013895.34C6
11916-Mar-2013232.64C6
12016-Mar-2013723.29C8
12117-Mar-2013278.34C3
12217-Mar-2013123.45C6
12317-Mar-2013673.45C4
12418-Mar-2013312.35C2
12519-Mar-2013863.34C5
12619-Mar-2013123.45C3
12719-Mar-2013965.76C1

 

Questions: 

  1. List the total number of orders for placed from each city.
  2. List the total value (amount) for each customer.
  3. List all the orders (ordered, order date, amount) along with customer details (customer name and city).
  4. List the customer's name with least total amount of orders.
  5. List the youngest customer.
  6. List the number of days past each order.

Step by Step Solution

3.44 Rating (151 Votes )

There are 3 Steps involved in it

Step: 1

Here are SQL queries for each of your questions along with the expected outputs Question 1 List the total number of orders placed from each city sql SELECT ccustCity COUNToorderID AS TotalOrders FROM ... 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

Ethical Obligations And Decision Making In Accounting Text And Cases

Authors: Steven Mintz

6th Edition

1264135947, 9781264135943

More Books

Students also viewed these Databases questions

Question

1. Assign study buddies who can be available over the phone.

Answered: 1 week ago