Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with these two questions on SQL. Here is the link to sql file with ap and om database: https://drive.google.com/file/d/1R70bmm1KlAXfqndPtZ2iV32VHQudYjxd/view?usp=sharing Q.1) (25 points)

I need help with these two questions on SQL.

Here is the link to sql file with ap and om database: https://drive.google.com/file/d/1R70bmm1KlAXfqndPtZ2iV32VHQudYjxd/view?usp=sharing

image text in transcribed

image text in transcribed

Q.1) (25 points) Use the ap database for this question. Write a query that replicates the result set shown below, matching all data and format aspects, including column headers: Vendor Contact NULL Phone : (800) 555-0855 HULL Phone : (704) 555-3500 Phone : (415) 555-7600 Phone : (908) 555-7222 Phone: (559) 555-5100 Phone : (55) 555-7900 Phone = (559) 555-3482 Vendor Dakota Baylec - Fresno Rack & Shelving Inc Violet Beauregard - United Parcel Service Lucy Bernard - Nat Assoc of Colcoe Stores Brittnee Bernardo - Baker & Taylor Books Korah Blanca - Golden Eagle Insurance Co Rachael Bluzinski - Unocal Daniel Bradlee - Simon Drect Inc Walter Bregg-Gostenian General Building Anne Braycon - Fresno Credit Bureau Klo Brenton - Fresno County Tex Collector Keely Brooklynn-Nielson Charit Bucket - Federal Express Corporation Trenth Camron - BM Priscila Carrollton - Publishers Weekly Julian Carson - Boucher Communications Inc Derek Chaddick - Fresno Photoengrang Company Kaylea Cheyeme-Ph Photographic Services Charic Churdi - Dataforms/West Ilian cifford - Champion Printing Company Dusty Colette - Small Press Leah Colton - The Fresno Bee HULL Vendor Location City: Fresno, State: CA City: Reno, State: NV City: Oberin, State: OH City: Charlotte, State: NC City: San Diego, State: CA City: Pasadena, State: CA City: East Brunswick, State: NJ City: Fresna, State: CA City: Fresno, State: CA City: Fresno, State: CA City: Chcrnat, State: CH City: Memphis, State: TN City: San Pancisco, State: CA City: Marion, State: OH City: Fort Washington, State: PA City: Fresno, State: CA City: Fresno, State: CA City: Fresno, State: CA City: Cincinnati, State: CH City: Traverse Cty, State: M1 City: Fresna, State: CA Phone : (800) 555-4091 Phone : (800) 555-4425 Phone : (800) 555-1669 Phone : (215) 555-8000 Phone: (559) 555-3005 Phone: (559) 555-0765 Phone : (800) 555-1957 FULL Phone: (559) 555-4442 The result set should contain 21 rows. Q.2) (25 points) Use the om database for this question. Write a query that replicates the result set below, matching all data and format aspects, including column headers: 32 479 order_id customer_name customer_fax Nickalus, Kurt 055556689 Eulalia, Kalsey 2095551302 Rand Yash 2095552282 321 Randal, Yash 2095552252 Randall Yash 2095552282 524 Panda Yash 2095552252 B02 Randall, Yash 2095552262 Holbrooke, Rashad 5595558495 Blanca, Korah 6145553928 Blanca, Korah 5145553928 B24 Blanca, Korah 6145559928 Quintin Marvin 6145557580 LOG Hostlery, Kaitlin 8005552826 29 Damien, Deborah No Fax Number 97 Kaleigh, Erick No Fax Number 118 Millerton Johnathon No Fax Number 144 Jacobsen, Samuel No Fax Number 158 Lacy, Karina No Fax Number 165 Keeton, Gonzalo No Fax Number 180 Carson, Julian No Fax Number 231 Irvin, Ania No Fax Number 242 Anum, Trisha No Fax Number Lacy, Karina No Fax Number order_date 2012-12-28 2012-11-10 2012-11-25 2013-09-09 2014-03-22 2014-05-04 2014-07-21 2013-01-20 2012-10-23 2014-01-30 2014-08-01 2014-05-09 2014-04-25 2012-11-05 2013-01-29 2013-02-24 2013-03-21 2013-04-04 2013-04-11 2013-04-25 2013-06-14 2013-06-24 2013-07-15 631 264 The result set should contain 47 rows. Only a subset of the result set is shown in the image. Q.1) (25 points) Use the ap database for this question. Write a query that replicates the result set shown below, matching all data and format aspects, including column headers: Vendor Contact NULL Phone : (800) 555-0855 HULL Phone : (704) 555-3500 Phone : (415) 555-7600 Phone : (908) 555-7222 Phone: (559) 555-5100 Phone : (55) 555-7900 Phone = (559) 555-3482 Vendor Dakota Baylec - Fresno Rack & Shelving Inc Violet Beauregard - United Parcel Service Lucy Bernard - Nat Assoc of Colcoe Stores Brittnee Bernardo - Baker & Taylor Books Korah Blanca - Golden Eagle Insurance Co Rachael Bluzinski - Unocal Daniel Bradlee - Simon Drect Inc Walter Bregg-Gostenian General Building Anne Braycon - Fresno Credit Bureau Klo Brenton - Fresno County Tex Collector Keely Brooklynn-Nielson Charit Bucket - Federal Express Corporation Trenth Camron - BM Priscila Carrollton - Publishers Weekly Julian Carson - Boucher Communications Inc Derek Chaddick - Fresno Photoengrang Company Kaylea Cheyeme-Ph Photographic Services Charic Churdi - Dataforms/West Ilian cifford - Champion Printing Company Dusty Colette - Small Press Leah Colton - The Fresno Bee HULL Vendor Location City: Fresno, State: CA City: Reno, State: NV City: Oberin, State: OH City: Charlotte, State: NC City: San Diego, State: CA City: Pasadena, State: CA City: East Brunswick, State: NJ City: Fresna, State: CA City: Fresno, State: CA City: Fresno, State: CA City: Chcrnat, State: CH City: Memphis, State: TN City: San Pancisco, State: CA City: Marion, State: OH City: Fort Washington, State: PA City: Fresno, State: CA City: Fresno, State: CA City: Fresno, State: CA City: Cincinnati, State: CH City: Traverse Cty, State: M1 City: Fresna, State: CA Phone : (800) 555-4091 Phone : (800) 555-4425 Phone : (800) 555-1669 Phone : (215) 555-8000 Phone: (559) 555-3005 Phone: (559) 555-0765 Phone : (800) 555-1957 FULL Phone: (559) 555-4442 The result set should contain 21 rows. Q.2) (25 points) Use the om database for this question. Write a query that replicates the result set below, matching all data and format aspects, including column headers: 32 479 order_id customer_name customer_fax Nickalus, Kurt 055556689 Eulalia, Kalsey 2095551302 Rand Yash 2095552282 321 Randal, Yash 2095552252 Randall Yash 2095552282 524 Panda Yash 2095552252 B02 Randall, Yash 2095552262 Holbrooke, Rashad 5595558495 Blanca, Korah 6145553928 Blanca, Korah 5145553928 B24 Blanca, Korah 6145559928 Quintin Marvin 6145557580 LOG Hostlery, Kaitlin 8005552826 29 Damien, Deborah No Fax Number 97 Kaleigh, Erick No Fax Number 118 Millerton Johnathon No Fax Number 144 Jacobsen, Samuel No Fax Number 158 Lacy, Karina No Fax Number 165 Keeton, Gonzalo No Fax Number 180 Carson, Julian No Fax Number 231 Irvin, Ania No Fax Number 242 Anum, Trisha No Fax Number Lacy, Karina No Fax Number order_date 2012-12-28 2012-11-10 2012-11-25 2013-09-09 2014-03-22 2014-05-04 2014-07-21 2013-01-20 2012-10-23 2014-01-30 2014-08-01 2014-05-09 2014-04-25 2012-11-05 2013-01-29 2013-02-24 2013-03-21 2013-04-04 2013-04-11 2013-04-25 2013-06-14 2013-06-24 2013-07-15 631 264 The result set should contain 47 rows. Only a subset of the result set is shown in the image

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

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions

Question

Why are absolute amounts of limited use when comparing companies?

Answered: 1 week ago