Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Ide Questions - 2 pts. each 1. What are the Customers First and Last Names? a. TIP This will be a select statement from the

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Ide Questions - 2 pts. each 1. What are the Customers First and Last Names? a. TIP This will be a select statement from the Customer table and instead of returning all columns, we just want the First and Last Names. 2. Which customer number has the highest Balance? 3. Which customer number has the lowest Balance? How many orders has Landi Santos taken? (I'd like a count of the row returned) 5. Using the same question as #4, what were the order numbers? (hint: select the order numbers, not a count) 6. Write a query that will return back the Customer First and Last Name along with the Employee First and Last Name if an Employee helped them with the Order? (I am looking for EVERY order, and if an order had an employee, also print the employee information. Hint: you will need an outer join somewhere) 7. Which order numbers have no Employee associated with them? 8. Listing the First and Last name of the customer, how many orders did they make? (hint: you will need count and a group by) 9. Return the name and email address of the Employee(s) who have not helped with an order 10. Using the OrderTbl, determine the count of orders by date to determine which date had the most orders. Script Output * Query Result * 9 ta E SQL All Rows Fetched: 6 in 0.056 seconds CUSTNO CUSTFIRSTNAME CUSTLASTNAME CUSTCITY CUSTSTATE CUSTZIP CUSTBAL 1 C0954327 Sheri Gordon Littleton CO 80129-5543 230 2 C1010398 Jim Glussman Denver 80111-0033 200 3 C2388597 Beth Taylor Seattle WA 98103-1121 4 C3340959 Betty Wise Seattle 98178-3311 5 03499503 Bob Mann Monroe 98913-1995 6 C8543321 Ron Thompson Renton 98666-1289 SQL All Rows Fetched: 9 in 0.023 seconds ORDNO ORDDATE CUSTNO EMPNO 1 01116324 23-JAN-13 C0954327 E8544399 2 02334661 14-JAN-13 00954327 E1329594 3 03331222 13-JAN-13 01010398 (null) 4 02233457 12-JAN-13 C2388597 E9884325 5 04714645 11-JAN-13 C2388597 E1329594 6 05511365 22-JAN-13 03340959 E9884325 7 07989497 16-JAN-13 C3499503 E9345771 8 01656777 11-FEB-13 C8543321 (null) 9 07959898 19-FEB-13 C8543321 E8544399 Script Output * Query Result * Ek SQL | All Rows Fetched: 6 in 0.031 seconds EMPNO EMPFIRSTNAME EMPLASTNAME EMPPHONE EMPEMAIL 1 E1329594 Landi Santos (303) 789-1234 LSantos@bigco.com 2 E8544399 Joe Jenkins (303) 221-9875 JJenkins@bigco.com 3 E8843211 Amy Tang (303)556-4321 ATang@bigco.com 4 E9345771 Colin white (303) 221-4453 CWhite@bigco.com 5 E9884325 Thomas Johnson (303)556-9987 TJohnson@bigco.com 6 E9954302 Mary Hill (303)556-9871 MHill@bigco.com

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions