Question
Please create a .sql file that answers the 2 questions below. Question 1: Write a query that will return a list of Vendors that have:
Please create a .sql file that answers the 2 questions below.
Question 1: Write a query that will return a list of Vendors that have: -- An 800 number -- The first number of their zipcode is from 1 to 5 -- The second number of their zipcode is from 3 to 5 -- The last number of their zipcode is a 5
Include these columns: VendorName, VendorPhone, and VendorZipCode
Expected output below: VendorName VendorPhone VendorZipCode Publishers Weekly (800) 555-1669 43305 Champion Printing Company (800) 555-1957 45225
Question 2: Write a query that returns all vendors that have a PO Box. Note, there are many forms that are listed (e.g., PO Box, P O Box, P.O. Box, etc.) so you should only look for Box. -- Exclude all records that do not have a phone number. -- Return VendorName, VendorAddress1, VendorAddress2, and VendorPhone. -- Do not show NULLs for any of the fields. You should account for NULLS being in VendorAddress1 and VendorAddress2 -- Sort the list by VendorName
Expected output below: VendorName VendorAddress1 VendorAddress2 VendorPhone American Express Box 0001 (800) 555-3344 BFI Industries PO Box 9369 (559) 555-1551 Blue Cross PO Box 9061 (800) 555-0912 Blue Shield of California PO Box 7021 (415) 555-5103 Cahners Publishing Company Citibank Lock Box 4026 8725 W Sahara Zone 1127 (301) 555-2162
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