Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Written in SQL --1. Using the least amount of code, list all the information on all of our customers. /*2. What cities do our customers

Written in SQL

--1. Using the least amount of code, list all the information on all of our customers.

/*2. What cities do our customers come from? Make sure each city only appears once on the list. Sort the cities in alphabetical order. */

/* 3. I would like to call all of our customers and thank them for ordering. Create a list that could be used for that purpose. Have the customer name in 1 column and the phone number in the 2nd column. */

/*4. Create a list of our customers and their addresses that live in Anoka. Use 1 column for the name and another for the address. Sort the list by customer name. */

/* 5. Create a list of customers with a last name starting with T and they live in Ramsey or Coon Rapids. */

/* 6. For each order list the following:. (Sort the list by customer, order description, order date) a. Customer name b. Order id c. Order Description (pickup or delivery) d. Order date */

/*7. How many delivery orders did we make? */

--8. Create a list of ingredients and the number of times that each ingredient -- was used on a pizza. Put the ingredient used most at the top of the list.

--9. Create a list of customers that have placed more than 20 orders. --Sort the list so the customer with the most orders appears at the top.

--10. What is the date of the first and last order taken?

/* 11. Add the following new customer. a. Cust_ID: 9999 b. Name: Ben Forta c. Phone: 555-9999 */

/*12. Customer 9999 has decided to have his pizza delivered and gave us the following address a. Street: 456 Main Street b. City: Anoka c. State: MN d. ZipCode: 55303 */

image text in transcribed

CUSTOMER Orderingredients Orders Pizzalngredients CustID Orderid + PK EK Orderid ... > PK IngrediD FirstName FK Ingredienti Order Date IngredDesc Last Name Order Time Street Order Type DeliveryTime PK City PK Order Type OrderType CustID State OrderType Order Desc Phone Number SizeID PizzaCrust ZipCode Crustid >0 # PK CrustID CrustType Delivery Area PizzaSize LPK Zip Code HPK SizelD CityName SizeDesc attribute name

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions