Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help Creating Queries for the data below: Example: PAYMENTS OFFICES EMPLOYEES CUSTOMERS Y CUSTOMERNUMBER Y CUSTOMERNUMBER || - EMP LASTNAME FIRSTNAME EXTENSION EMAIL OFFICECODE CHECKNUMBER

Help Creating Queries for the data below:

image text in transcribedExample:

image text in transcribed

image text in transcribed

PAYMENTS OFFICES EMPLOYEES CUSTOMERS Y CUSTOMERNUMBER Y CUSTOMERNUMBER || - EMP LASTNAME FIRSTNAME EXTENSION EMAIL OFFICECODE CHECKNUMBER CUSTOMERNAME CITY PHONE ADDRESSLINE1 ADDRESSLINE STATE COUNTRY POSTALCODE PAYMENTDATE CONTACTFIRSTNAME PHONE ADDRESSLINE1 ADDRESSLINE2 CITY OBTITLE ORDERS ORDERNUMBER ORDERDATE REQUIREDDATE SHIPPEDDATE STATUS COMMENTS PRODUCTLINES PRODUCTLINE PRODUCTS PRODUCTCODE HTMLDESCRIPTION MAGE PRODUCTLINE PRODUCTSCALE ORDERDETAILS ORDERNUMBER PRODUCTDESCRIPTION QUANTITYINSTOCK BUYPRICE MSRP PRICEEACH ORDERLINENUMBER Show the employees names, city, state and country for Sales Reps working outside of the USA. SQL SELECT e.firstname, e.lastname, o.city, o.state, o.country FROM employees e INNER JOIN offices o ON e.officecode WHERE e.jobtitle 'Sales Rep' AND o.country 'USA'; o.officecode 5) For each Sales rep working in the EMEA territory, show the customer name of customers who are in the same country as the sales rep. 6) Show the total order amount (quantityordered * priceeach) for each customer located in Finland, Denmark or Sweden. Be sure to show the customer's name and only include orders that have shipped 7) For each Sales Manager, show a count of the number of Sales reps. that report to them 8.For each customer, show the net balance of total order amount vs. total payments

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

Options Futures And Other Derivatives

Authors: John Hull

9th Global Edition

1292212896, 9781292212890

More Books

Students also viewed these Accounting questions

Question

b. Explain how you initially felt about the communication.

Answered: 1 week ago

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago