Question

Problem 32 Write a query to display the first name, last name, street, city, state, and...

Problem 32 Write a query to display the first name, last name, street, city, state, and zip code of any customer who purchased a Foresters Best brand top coat between 2017-7-15, and 2017-7-31. If a customer purchased more than one such product, display the customer’s information only once in the output. Sort the output by state, last name, and then first name (Partial results shown in Figure P7.32). Figure 7.32 Figure P7.32

Homework Answers

Answer #1

Select distinct LGCustomer.Cust_Fname, LGCustomer.Cust_Lname, LGCustomer.Cust_Street, LGCustomer.Cust_City, LGCustomer.Cust_State, LGCustomer.Cust_Zip from LGCustomer , LGInvoice, LGLine, LGProduct, LGBrand where LGCustomer.Cust_Code = LGInvoice.Cust_Code and LGInvoice.Inv_Num = LGLine.Inv_Num and LGLine.Prod_SKU = LGProduct.Prod_SKU and LGProduct.Brand_ID = LGBrand.Brand_ID and LGBrand.Brand_Name = "FORESTERS BEST" and LGProduct.Prod_Category = "Top Coat" and LGInvoice.Inv_Date between str_to_date('7/15/2015', '%d/%m/%y') and str_to_date('7/31/2015', '%d/%m/%y') order by LGCustomer.Cust_State, LGCustomer.Cust_Fname;

Do ask if any doubt. Please up-vote.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
I am using Oracle HR. Write a query to display the last name of employees, length...
I am using Oracle HR. Write a query to display the last name of employees, length of the name, and first monday since the hire date. Make the query that the user is prompted to enter a letter that the last name start with by using a substitution variable for the letter. For example, if the user enters "H" or "h" when prompted, the output should show all employees whose start with letter H and make sure that the case...
Customers ID Name Street City Zip email 1 Emily 101 Anza St San Francisco 94118 2...
Customers ID Name Street City Zip email 1 Emily 101 Anza St San Francisco 94118 2 Amy 1 Houston Ave New York 12111 3 John 29 Sunset Blvd Los Angeles 45643 4 Pam 800 Market St San Francisco 94080 5 Sue 400 Muir Ave Redwood City 94598 6 Chris 987 A Ave New York 13111 7 Todd 788 Harrison St San Francisco 94117 Products ID Product_name Price Quantity 1 Metal pen 5.99 20 2 Surge protector 25.99 0 3 pencil...
**JAVA LANGUAGE** Write a program that models an employee. An employee has an employee number, a...
**JAVA LANGUAGE** Write a program that models an employee. An employee has an employee number, a name, an address, and a hire date. A name consists of a first name and a last name. An address consists of a street, a city, a state (2 characters), and a 5-digit zip code. A date consists of an integer month, day and year. All fields are required to be non-blank. The Date fields should be reasonably valid values (ex. month 1-12, day...
Programming Language is Java In class you learned how to work with collections and streams. This...
Programming Language is Java In class you learned how to work with collections and streams. This lab allows you to apply the skills you learned to a list of riders. With your first two assignment complete, the coordinator at the Car Safety Academy decided to begin collecting names for a monthly mailing list. You've been asked to collect the names and perform some processing. First you will create a Riders class. Then you will create an array of riders with...
Create a query to contain all fields except Home Phone for clients who live in Ohio...
Create a query to contain all fields except Home Phone for clients who live in Ohio or Illinois. Sort the records by the Last Name field. Use the mail merge feature of your word processing software to create mailing labels for these clients. The labels will be attached to advertising brochures to be sent to these clients. Clients Title First Name Last Name Address City State ZIP Code Home Phone Mr. David Morad 100 Bent Tree Fairfield OH 45221 (513)...
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table....
Lab 5 Queries with Multiple Tables In this lab, we do queries more than one table. SQL provides two different techniques for querying data from multiple tables: • The SQL subquery • The SQL join As you will learn, although both work with multiple tables, they are used for slightly different purposes. We used WMCRM database which is what we created in Lab 4. Here is the summary of the database schema (where schema is used in its meaning of...
John Williams (birthdate August 2, 1974) is a single taxpayer, and he lives at 1324 Forest...
John Williams (birthdate August 2, 1974) is a single taxpayer, and he lives at 1324 Forest Dr., Reno, NV 89501. His Social Security number is 555-94-9358. John's earnings and withholdings as the manager of a local casino for 2016 are reported on his Form W-2: a Employee's social security number 555-94-9358 OMB No. 1545-0008 Safe, accurate, FAST! Use IRS e ~ file Visit the IRS website at www.irs.gov/efile b Employer identification number (EIN) 31-1459656 1 Wages, tips, other compensation 194,000.00...
I completed everything except for the last part. I know my answers are right because i...
I completed everything except for the last part. I know my answers are right because i double checked but i just dont know how to answer the last section. Problem 3-1 Schedule C (LO 3.1) Scott Butterfield is self-employed as a CPA. He uses the cash method of accounting, and his Social Security number is 644-47-7833. His principal business code is 541211. Scott's CPA practice is located at 678 Third Street, Riverside, CA 92860. Scott’s income statement for the year...
Tax Return Project James A. Varney and Denise M. Varney James and Denise Varney are married...
Tax Return Project James A. Varney and Denise M. Varney James and Denise Varney are married and file a joint return. James is 48 years of age and Denise is 49. James is employed full-time as an electrical engineer for Livingston Unitech Corporation, Ltd. Denise is a self-employed design consultant. They have two children, Pamela and Vernon, who live at home and receive all of their support from their parents. Pamela is 20 years old and attended college on a...
Lance H. and Wanda B. Dean are married and live at 431 Yucca Drive, Santa Fe,...
Lance H. and Wanda B. Dean are married and live at 431 Yucca Drive, Santa Fe, NM 87501. Lance works for the convention bureau of the local Chamber of Commerce, while Wanda is employed part-time as a paralegal for a law firm. During 2016, the Deans had the following receipts: Salaries ($60,000 for Lance, $41,000 for Wanda) $101,000 Interest income—    City of Albuquerque general purpose bonds $1,000    Ford Motor company bonds 1,100    Ally Bank certificate of deposit 400 2,500 Child...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT