Write a query to display the employee number, first name, last name, and largest salary amount for each employee in department 200. Sort the output by largest salary in descending order. Write a query to display the invoice number, line numbers, product SKUs, product descriptions, and brand ID for sales of sealer and top coat products of the same brand on the same invoice. Write a query to display the customer code, first name, and last name of all customers who have had at least one invoice completed by employee 83649 and at least one invoice completed by employee 83677. Sort the output by customer last name and then first nam

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question
  1. Write a query to display the employee number, first name, last name, and largest salary amount for each employee in department 200. Sort the output by largest salary in descending order.
  2. Write a query to display the invoice number, line numbers, product SKUs, product descriptions, and brand ID for sales of sealer and top coat products of the same brand on the same invoice.
  3. Write a query to display the customer code, first name, and last name of all customers who have had at least one invoice completed by employee 83649 and at least one invoice completed by employee 83677. Sort the output by customer last name and then first name.
LGCUSTOMER
LGBRAND
PK Cust Code
PK Brand 1D
Cust_Fname
Cust_Lname
Cust Street
Cust_City
Cust_State
Cust_ZIP
Cust_Balance
Brand_Name
Brand_Type
includes
places
LGPRODUCT
LGLINE
PK
Prod SKU
LGINVOICE
PK,FK1 Inv_Num
Line_Num
Prod_Descript
Prod Type
Prod_Base
Prod_Category
Prod_Price
Prod_QOH
Prod_Min
FK1 Brand_ID
PK
Inv Num
PK
appears on
contains
--
Prod_SKU
Line_Qty
Line_Price
FK1 Cust_Code
FK2
Inv_Date
Inv_Total
FK2 Employee_ID
completes
provided by
LGEMPLOYEE
PK
Emp Num
LGSALARY_HISTORY
LGSUPPLIES
Emp_Fname
Emp_Lname
Emp_Email
Emp_Phone
Emp_Hiredate
Emp_Title
Emp_Comm
FK1 Dept_Num
PK,FK1 Emp_Num
PK
PK,FK1 Vend_ID
PK,FK2 Prod_SKU
has
Sal_From
Sal_End
Sal_Amount
provides
employs
manages
LGVENDOR
PK Vend ID
LGDEPARTMENT
Vend_Name
Vend_Street
Vend_City
Vend_State
Vend_ZIP
PK
Dept_Num
Dept_Name
Dept_Mail_Box
Dept_Phone
FK1 Emp_Num
Transcribed Image Text:LGCUSTOMER LGBRAND PK Cust Code PK Brand 1D Cust_Fname Cust_Lname Cust Street Cust_City Cust_State Cust_ZIP Cust_Balance Brand_Name Brand_Type includes places LGPRODUCT LGLINE PK Prod SKU LGINVOICE PK,FK1 Inv_Num Line_Num Prod_Descript Prod Type Prod_Base Prod_Category Prod_Price Prod_QOH Prod_Min FK1 Brand_ID PK Inv Num PK appears on contains -- Prod_SKU Line_Qty Line_Price FK1 Cust_Code FK2 Inv_Date Inv_Total FK2 Employee_ID completes provided by LGEMPLOYEE PK Emp Num LGSALARY_HISTORY LGSUPPLIES Emp_Fname Emp_Lname Emp_Email Emp_Phone Emp_Hiredate Emp_Title Emp_Comm FK1 Dept_Num PK,FK1 Emp_Num PK PK,FK1 Vend_ID PK,FK2 Prod_SKU has Sal_From Sal_End Sal_Amount provides employs manages LGVENDOR PK Vend ID LGDEPARTMENT Vend_Name Vend_Street Vend_City Vend_State Vend_ZIP PK Dept_Num Dept_Name Dept_Mail_Box Dept_Phone FK1 Emp_Num
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education