Answered step by step
Verified Expert Solution
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:
Example:
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started