Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the appropriate postgreSQL queries for the following scenarios Here is some sample data. As the question states, the activities column is the one

Please write the appropriate postgreSQL queries for the following scenarios

image text in transcribed

image text in transcribed

Here is some sample data. As the question states, the activities column is the one to be referencing. The link below provides a more clear picture, I did not have room to provide a higher quality photo.

https://imgur.com/a/dSRUPaF

image text in transcribed

The mishmash of text makes it impossible to perform a typical count that would allow you to group processing plants by activity., However, you car make some modifications to fix this data. Your tasks are as follows Create two new columns called neat processing and poultry_processing in your table. Each can be of the type boolean 2. Using UPDATE, set meat_processing TRUE on any row where the activities column contains the text Meat Processing. Do the same update on the poultry_processing column, but this time look for the text Poultry Processing in activities. Use the data from the new, updated columns to count how many plants perform each type of activity. For a bonus challenge, count how many plants perform both activities. 3. TRY IT YOURSELF ou'll turn the meat poultry_egg inspect table intc usefu You need to answer two questions: how many of the plant mation. process meat, and how many process poultry? The answers to these two questions lie in the activities colu nately, the column contains an assortment of text with inconsistent an example of the kind of text you'll find in the activities column ties column. Unfort put. Here Poultry Processing, Poultry Slaughter Meat Processing, Poultry Processing Poultry Processing, Poultry Slaughter B5B Poultrg Co. Inc NJ 8347 (856) 632-889 SC 29150 (803)481.8656 TX (254) 412.5918 WV #(304) 538-7811 GA 31533 (912) 383.3302 NO 58301 (701 882 2309 LA 7457 (313) 352.9600 TX ### (903) 575-360( TX (903) 675-1000 NJ 7201 (201 770-1143 GA 30601 (706) 425-7500 NJ 7008 (908) 754-1300 GA 30601 (706) 425 7500 NJ 7202 (908)354-267 8 7/2007 Poutry Processing. Poutry Slaughker 12130/2014 Poutry Processing. Poutry Slaughter Pilgrim's Pride Coeporation Filgim's Pride Coporation Flgrim's Pride Corporation 701Foods, Ino. Pilgrim's Pride Corporation Filgrim's Pride Coporation 2050 Hghway 15 South 2500 East Lakeshore Dr. 123 Potomac Avenue 113 McNeal Drive 515 Hwy 20 South 9i312013 Pouty Processing. Poutry Slaugher Rockingham Pouty. bnc;Shen Valey Faims:Shen Vales P 912015 Poutry Processing.Poultry Slaughter 71252012 Mes Processing, Poultry Processing Flatlander Foods 1212015 Poutry Processing. Poutry Sleughker 8#2212014 Pouty Piocessing. Poutry Slaugher 162015 Poutry Processing, Poultry Slaugker 81232016 Cettficstion Eiport, Identification-Meat, Identificstic NLLL 731 2015 Poutiy Piocessing. Poutry Slaughker 1030 Pignm Street . East Plant Airirigo USA InctSeairigo Coldstorage 900 Farmont Avenue Filgim's Pride Coporation Amencan Food Espor Service 1100 Milk, Street 342008 Cert lcation-Esport,Identification-Meat,Ident ficacic NULL 7/3t/2015 Poutry Prooessing 814 Americas, Inc. 814 Second Avenue 5901 Highway 74 Vest PO Bo#668 Abuin Packingre14 Americas Smithield 21412015 Pouty Processing. Poutry Slaugker 1212016 Poutry Processing, Poutry Slaugker n32016 Poutry Processing, Poutry Sloughker 3r312011 Pouty Processing. Poutry Slaugher 52014 Poutry Processing. Poultry Slaugker 42016 Mes Processing, Poultry Processing 1412015 Poutry Processing. Poutry Sleughker 7/2812011 Poutry Processing. olunay Piocessing-Poultry 219 2015 Mo Processing, Poultry Processing 22016 Poutry Processing, Poutry Sloughter Rockingham Poutry: Wampler Foods he Pilgrima Pride Corporation Pilgrims Ptide Corporation Filgime Pide Corporation Pilgrims Pride Corporation A B Famous Get ite Fish Inc. 591 Broad Street 3500 Lake Gunteisvile Pak Drive 13740 US Hwy 90 West NC TN AL FL ### (919) 774-7333 (4231242-6670 ### (256) 582-5631 ### (386) 362-2541 Country Pride; Rookingham; To-Rioos Gold Kist Gold Kist Farms; Kitkland's Pilgrim's Frst Chpice Meat Courery Ptide; Pierce Foods Wampler Foods Filgrims Pide Corporation 4633 Count Road 636 1300 Maket Street Enterprise AL ++(334) 347-0515 N 7739 (732)668 1400 MS 39051 (6011 238-5360 Pilgrims Pide Coporation A&GFood Service LLC Counery Pride ### (423) 242-667t M46867-P46867 Pilgrims Ptide Corporation 401 South 3rd Street 3865 Hahwau 35 Noth

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

Database Publishing With Filemaker Pro On The Web

Authors: Maria Langer

1st Edition

0201696657, 978-0201696653

More Books

Students also viewed these Databases questions

Question

What is the environment we are trying to create?

Answered: 1 week ago

Question

How can we visually describe our goals?

Answered: 1 week ago