Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a query to display the customer code, customer last name, and the number of invoices generated by that customer. Limit the results to only

image text in transcribed

Write a query to display the customer code, customer last name, and the number of invoices generated by that customer. Limit the results to only customers who have at least five invoices. Sort the results by customer code. The column labels and first few rows of your output must match the figure below.

image text in transcribed

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 CUST_CODE CUST_LNAME Number of Invoices 86 HUDSON 88 10 VIGIL 89 CANTRELL GOLDMAN 90 6 92 GONZALEZ 93 BASSETT 95 DUNLAP 6 96 TRUJILLO 10 97 ANDERSON 98 MARINO 14 99 VENTURA 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 CUST_CODE CUST_LNAME Number of Invoices 86 HUDSON 88 10 VIGIL 89 CANTRELL GOLDMAN 90 6 92 GONZALEZ 93 BASSETT 95 DUNLAP 6 96 TRUJILLO 10 97 ANDERSON 98 MARINO 14 99 VENTURA

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

IT Auditing Using A System Perspective Premier Reference Source

Authors: Robert Elliot Davis

1st Edition

1799855481, 978-1799855484

More Books

Students also viewed these Accounting questions

Question

Explain basic guidelines for effective multicultural communication.

Answered: 1 week ago

Question

Identify communication barriers and describe ways to remove them.

Answered: 1 week ago

Question

Explain the communication process.

Answered: 1 week ago