LGCUSTOMER PK Cust Code Cust Frame Cust_Lname Cust Street Cust City Cust State PK FK1 Cust_ZIP...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
LGCUSTOMER PK Cust Code Cust Frame Cust_Lname Cust Street Cust City Cust State PK FK1 Cust_ZIP Cust Balance places LGINVOICE Inv Num Cust Code Inv_Date Inv Total FK2 Employee ID completes LGEMPLOYEE PK Emp Num PK Emp_Fname Emp_Lname Emp_Email Emp_Phone Emp Hiredate Emp Title Emp_Comm FK1 Dept Num employs manbges LGDEPARTMENT Dept Num Dept Name Dept Mail Box Dept Phone FK1 Emp Num contains has LGLINE PK,FK1 InvNum PK Line Num FK2 Prod_SKU Line Qty Line Price LGSALARY HISTORY PK,FK1 Emp Num Sal From PK Sal End Sal Amount appears on HH LGBRAND PK Brand ID Brand Name Brand Type includes 8 LGPRODUCT PK Prod SKU Prod Descript Prod Type Prod Base Prod_Category Prod Price Prod_QOH Prod_Min FK1 Brand ID provided by LGSUPPLIES PK,FK1 Vend ID PK,FK2 Prod SKU provides LGVENDOR PK Vend ID Vend Name Vend Street Vend_City Vend State Vend ZIP 50. Write a query to display the invoice number, line numbers, product SKUs, product descriptions, and brand ID for sales of sealer and topcoat products of the same brand on the same invoice. Sort the results by invoice number in ascending order, first line number in ascending order, and then by second line number in descending order. INV NUM 115 118 135 153 222 LINE_ NUM 2 N. 2 5 2 1 PROD_ SKU 5140- RTG 5140- RTG 3036- PCT 3701- YAW 1336- FVM PROD_DESCRIPT Fire Resistant Sealer, for Exterior Wood (ULC Approved) Fire Resistant Sealer, for Exterior Wood (ULC Approved) Sealer, for Knots Sealer, Solvent Based, for Concrete Floors Alkyd, Sanding Sealer, Clear LINE_ NUM 1 5 2 1 3 PROD SKU 1203-AIS 5046- TTC 1074-VVJ 3955- NWD 8199- YRF PROD_ DESCRIPT Fire Retardant Coating, Latex, Interior, Flat (ULC Approved) Aluminum Paint, Heat Resistant (Up to 427C - 800F) (eggshell-like - MPI Gloss Level 3) Light Industrial Coating, 25 Exterior, Water Based Water Repellant, Clear (Not Paintable) BRAND_ ID 35 Varnish, Exterior, Water Based, (Satin-Like) MPI Gloss Level 4 35 30 33 52. 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. CUST CODE 684 684 340 211 903 643 295 53. LargeCo is planning a new promotion in Alabama (AL) and wants to know about the largest purchases made by customers in that state. Write a query to display the customer code, customer first name, last name, full address, invoice date, and invoice total of the largest purchase made by each customer in Alabama. Be certain to include any customers in Alabama who have never made a purchase; their invoice dates should be NULL and the invoice totals should display as O. Sort the results by customer last name and then first name. sust code sustiname sust.Iname sust street ADDISON 323 LORETTA PLACE 680 RED TALON DRIVE 829 BIG BEND LOOP 393 853 ROBIN NINA DORTHY FOSTER ALLEN AUSTIN BERNAL CUST FNAME WENDI WENDI GAYLORD BOLTON MARCIA GERALD 1299 EAST 3RD AVENUE 1069 LUGENE LANE sust fitx Mobile Robertsdale AL sust state sust.zie inx.date AL CUST LNAME BEAN BEAN Diamond Shamrock Birmingham AL Montgomery AL BURRIS CAUDILL AL 36693 36574 2017-08-26 35280 2017-06-21 36614 2017-04-24 NULL Largest Invoice 230.63 11.99 589.75 0.00 36131 2017-11-25 372.68 LGCUSTOMER PK Cust Code Cust Frame Cust_Lname Cust Street Cust City Cust State PK FK1 Cust_ZIP Cust Balance places LGINVOICE Inv Num Cust Code Inv_Date Inv Total FK2 Employee ID completes LGEMPLOYEE PK Emp Num PK Emp_Fname Emp_Lname Emp_Email Emp_Phone Emp Hiredate Emp Title Emp_Comm FK1 Dept Num employs manbges LGDEPARTMENT Dept Num Dept Name Dept Mail Box Dept Phone FK1 Emp Num contains has LGLINE PK,FK1 InvNum PK Line Num FK2 Prod_SKU Line Qty Line Price LGSALARY HISTORY PK,FK1 Emp Num Sal From PK Sal End Sal Amount appears on HH LGBRAND PK Brand ID Brand Name Brand Type includes 8 LGPRODUCT PK Prod SKU Prod Descript Prod Type Prod Base Prod_Category Prod Price Prod_QOH Prod_Min FK1 Brand ID provided by LGSUPPLIES PK,FK1 Vend ID PK,FK2 Prod SKU provides LGVENDOR PK Vend ID Vend Name Vend Street Vend_City Vend State Vend ZIP 50. Write a query to display the invoice number, line numbers, product SKUs, product descriptions, and brand ID for sales of sealer and topcoat products of the same brand on the same invoice. Sort the results by invoice number in ascending order, first line number in ascending order, and then by second line number in descending order. INV NUM 115 118 135 153 222 LINE_ NUM 2 N. 2 5 2 1 PROD_ SKU 5140- RTG 5140- RTG 3036- PCT 3701- YAW 1336- FVM PROD_DESCRIPT Fire Resistant Sealer, for Exterior Wood (ULC Approved) Fire Resistant Sealer, for Exterior Wood (ULC Approved) Sealer, for Knots Sealer, Solvent Based, for Concrete Floors Alkyd, Sanding Sealer, Clear LINE_ NUM 1 5 2 1 3 PROD SKU 1203-AIS 5046- TTC 1074-VVJ 3955- NWD 8199- YRF PROD_ DESCRIPT Fire Retardant Coating, Latex, Interior, Flat (ULC Approved) Aluminum Paint, Heat Resistant (Up to 427C - 800F) (eggshell-like - MPI Gloss Level 3) Light Industrial Coating, 25 Exterior, Water Based Water Repellant, Clear (Not Paintable) BRAND_ ID 35 Varnish, Exterior, Water Based, (Satin-Like) MPI Gloss Level 4 35 30 33 52. 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. CUST CODE 684 684 340 211 903 643 295 53. LargeCo is planning a new promotion in Alabama (AL) and wants to know about the largest purchases made by customers in that state. Write a query to display the customer code, customer first name, last name, full address, invoice date, and invoice total of the largest purchase made by each customer in Alabama. Be certain to include any customers in Alabama who have never made a purchase; their invoice dates should be NULL and the invoice totals should display as O. Sort the results by customer last name and then first name. sust code sustiname sust.Iname sust street ADDISON 323 LORETTA PLACE 680 RED TALON DRIVE 829 BIG BEND LOOP 393 853 ROBIN NINA DORTHY FOSTER ALLEN AUSTIN BERNAL CUST FNAME WENDI WENDI GAYLORD BOLTON MARCIA GERALD 1299 EAST 3RD AVENUE 1069 LUGENE LANE sust fitx Mobile Robertsdale AL sust state sust.zie inx.date AL CUST LNAME BEAN BEAN Diamond Shamrock Birmingham AL Montgomery AL BURRIS CAUDILL AL 36693 36574 2017-08-26 35280 2017-06-21 36614 2017-04-24 NULL Largest Invoice 230.63 11.99 589.75 0.00 36131 2017-11-25 372.68
Expert Answer:
Answer rating: 100% (QA)
1 SELECT COUNT AS Brands FROM LGBRAND 2 SELECT DeptNum AS Department Number C... View the full answer
Related Book For
Database Systems Design Implementation and Management
ISBN: 978-1285196145
11th edition
Authors: Carlos Coronel, Steven Morris
Posted Date:
Students also viewed these databases questions
-
Jessica is planning to paint her room. It measures 11 feet by 13 feet and has 8 -foot ceilings. One long wall and one short wall each have a window that measures 3 feet by 4 feet. One short wall has...
-
On April 1, 20X1, Abingdon Company paid $200,000 for 8,000 shares of Galax Company when Galax's total stockholders' equity (including beginning retained earnings) was $210,000 (no additional common...
-
Write the SQL code to create the table structures for the entities shown in Figure P7.65. The structures should contain the attributes specified in the ERD. Use data types that would be appropriate...
-
Greenback Sporting, a retailer of outdoor wear and sporting equipment, is investigating an opportunity to purchase Active Lifestyle Inc. An acquisition is expected to lower overhead costs, improve...
-
A non-conducting sphere of radius R = 50 mm charged uniformly with surface density = 10.0C/m2 rotates with an angular velocity w = 70 rad/s about the axis passing through its centre. Find the...
-
What strategies can be implemented to apply advanced mathematical optimization techniques, such as linear programming and nonlinear optimization, to maximize yield and minimize costs in manufacturing...
-
Consider the inspection described in Example 2.11. From a bin of 50 parts, 6 parts are selected randomly without replacement. The bin contains 3 defective parts and 47 nondefective parts. What is the...
-
Refer to Exhibit, "Management Certifications at Groupon." Comment on the fact that the certification discusses management's responsibility regarding internal controls, and yet the 8-K disclosure...
-
Given the polynomial: f(x) = x+4, state the number of turning points.
-
Prove that Then show that the regions under the hyperbola over the intervals [1, 2], [2, 4], [4, 8], . . . all have the same area (Figure 3). bla 1 1 L = = dx = fi = = dx te - Ja x X dx for a, b 0.
-
Strategizing is to _____ as originality is to _____. A) practical intelligence; analytic intelligence B) creative intelligence; practical intelligence C) analytic intelligence; practical intelligence...
-
Explain principles for effective phone conversations and videoconferences.
-
Explain the FAIR approach to ethical business communications.
-
Create specific and persuasive proposals.
-
Explain the principles of effective virtual team communication.
-
Describe and demonstrate approaches to planning, running, and following up on meetings.
-
Which of the following statement(s) is/are true regarding Google File System (GFS)? The GFS master server keeps track of the meta data of files, e.g., the mapping from file chunks to the chunkservers...
-
Using Apple, demonstrate how the differentiation strategy can be well implemented.
-
Using the descriptions of the attributes given in the figure, convert the ERD shown in Figure P6.1 into a dependency diagram that is in at least 3NF.
-
Do the tables exhibit referential integrity? Answer yes or no and then explain your answer. Write NA (Not Applicable) if the table does not have a foreign key. Discuss in detail.
-
What is a consistent database state, and how is it achieved?
-
A typical muscle fiber is 2.0 cm long and has a cross-section area of 3.1 10-9 m 2 . When the muscle fiber is stimulated, it pulls with a force of 1.2 mN. What is the work done by the muscle fiber...
-
You are pulling a child in a wagon. The rope handle is inclined upward at a 60 angle. The tension in the handle is 20 N. How much work do you do if you pull the wagon 100 m at a constant speed?
-
A wind turbine works by slowing the air that passes its blades and converting much of the extracted kinetic energy to electric energy. A large wind turbine has 45-m-radius blades. In typical...
Study smarter with the SolutionInn App