Parse the JSON files below into two SQL tables; One will be StateHospital and the other Hospital; once in SQL calculate the min, max, avg, and total of hospital beds for the whole state, by rural...

1 answer below »


Parse the JSON files below into two SQL tables; One will be StateHospital and the other Hospital; once in SQL calculate the min, max, avg, and total of hospital beds for the whole state, by rural areas and by urban areas; After those calculations, a
dd two fictitious hospitals at the hospital table populating at least 10 fields/columns, update the records you inserted, then delete those records you added, in summary, apply all the statements you learned this week plus what you have learned up to now (need to have a user-defined function at minimum)
.Make sure to use try/exception to avoid code-breaking.




The StateHospital data will be downloaded fromhttps://www.communitybenefitinsight.org/api/get_hospitals.php?state=Links to an external site.







And the Hospital fromhttps://www.communitybenefitinsight.org/api/get_hospital_data.php?hospital_id=Links to an external site.




Answered Same DayNov 13, 2022

Answer To: Parse the JSON files below into two SQL tables; One will be StateHospital and the other Hospital;...

Aditi answered on Nov 14 2022
36 Votes
Solution
Aggregate Functions for Rural Areas:
Aggregate Functions for Urban Areas:
Before Adding
Records to Hospital Table:
After Adding Records to Hospital Table:
INSERT INTO `hospital` VALUES ('',0,6780,0,1310909,'0.00000000000000000000',0,0,8,0,0,'Y',0,0,0,0,408,59953771,22268,'',0,'0.00818600000000000000','0.00000000000000000000',0,0,'0.00000000000000000000','','0.00000000000000000000','0.00000000000000000000','AIMS Hospital',0,0,'0.00000000000000000000',0,0,6498,'N','','19.700',3480397,0,0,0,'ME',0,32281,9000,6000,4,'Y','0.00010000000000000000','13.26088870000000000000',0,'3.10948990000000000000','October 9, 2022','0.00000000000000000000','','6.12304880000000000000',7537604,6408,'',0,'0.05679180000000000000',-392891,0,'Y','',0,0,'13.600','6.36704110000000000000',0,2010,'0.00000000000000000000','Chirayu Hospital',39599,0,0,'1.12951330500000000000',0,'',1778461,0,'N','','04883','Cross...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here