Answered step by step
Verified Expert Solution
Question
1 Approved Answer
8. Write a query to display the employee number, first name, last name, brand name, and total units sold for each brand by that employee.
8. Write a query to display the employee number, first name, last name, brand name, and total units sold for each brand by that employee. Sort the results by employee number. The column labels and first few rows of your output must match the figure below.
LGCUSTOMER LGBRAND PK Cust Code PK Brand ID Cust Fname Cust Lname Cust Street Brand Name Brand Type Cust City Cust State Cust ZIP Cust Balance inclldes places LGPRODUCT LGLINE PK Prod SKU LGINVOICE PK,FK1 Iny Num PK Prod Descript Prod Type Prod Base Prod Category Prod Price Prod QOH Line Num PK Inv Num appears on contains FK1 Cust Code Inv Date Inv_Total FK2 Employee ID FK2 Prod SKU Line_Qty Line Price Prod Min FK1 Brand 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 manhges employs 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 EMP LNAME EMPLOYEE_ID Total Units Sold EMP_FNAME BRAND_NAME 83509 FRANKLYN STOVER BINDER PRIME 48 FRANKLYN 83509 STOVER BUSTERS 38 42 83509 FRANKLYN STOVER FORESTERS BEST 83509 67 FRANKLYN STOVER HOME COMFORT 83509 LE MODE 96 FRANKLYN STOVER 83509 FRANKLYN 76 STOVER LONG HAUL FRANKLYN STOVER 83509 OLDE TYME QUALITY 69 FRANKLYN STOVER 83509 STUTTENFURST 66 STOVER FRANKLYN 33 83509 VALU-MATTE 83537 CLEO ENGLISH 106 BINDER PRIME ENGLISH 83537 CLEO BUSTERS 84 83537 CLEO ENGLISH FORESTERS BEST 64 LGCUSTOMER LGBRAND PK Cust Code PK Brand ID Cust Fname Cust Lname Cust Street Brand Name Brand Type Cust City Cust State Cust ZIP Cust Balance inclldes places LGPRODUCT LGLINE PK Prod SKU LGINVOICE PK,FK1 Iny Num PK Prod Descript Prod Type Prod Base Prod Category Prod Price Prod QOH Line Num PK Inv Num appears on contains FK1 Cust Code Inv Date Inv_Total FK2 Employee ID FK2 Prod SKU Line_Qty Line Price Prod Min FK1 Brand 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 manhges employs 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 EMP LNAME EMPLOYEE_ID Total Units Sold EMP_FNAME BRAND_NAME 83509 FRANKLYN STOVER BINDER PRIME 48 FRANKLYN 83509 STOVER BUSTERS 38 42 83509 FRANKLYN STOVER FORESTERS BEST 83509 67 FRANKLYN STOVER HOME COMFORT 83509 LE MODE 96 FRANKLYN STOVER 83509 FRANKLYN 76 STOVER LONG HAUL FRANKLYN STOVER 83509 OLDE TYME QUALITY 69 FRANKLYN STOVER 83509 STUTTENFURST 66 STOVER FRANKLYN 33 83509 VALU-MATTE 83537 CLEO ENGLISH 106 BINDER PRIME ENGLISH 83537 CLEO BUSTERS 84 83537 CLEO ENGLISH FORESTERS BEST 64
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