Closed TathagataChakraborti closed 3 years ago
@MayankAgarwal I need some sample SQL queries to get started.
[x] DL Hospitalization percentage query
SELECT D1.date, (D2.hospital_beds_occupied + D2.covid_care_center_beds_occupied + D2.covid_health_center_beds_occupied) *1.0/ D1.active_cases AS perc_hospitalized from DL_cumulative D1 JOIN DL_patient_mgmt D2 ON D1.date == D2.date WHERE perc_hospitalized is NOT NULL
occupied hospital beds / number of active cases
). While the hospitalization rate during the initial waves of COVID-19 is estimated to be around 40-50%, it is comparatively higher during the deadly second wave and is estimated to be around 60-65%.[x] DL ratio of RTPCR tests
Select D1.date, D1.rtpcr_test_24h *1.0/ D2.tests_conducted AS rtpcr_ratio FROM DL_testing_status D1 JOIN DL_case_info D2 ON D1.date == D2.date WHERE rtpcr_ratio is NOT NULL
[x] DL vacant beds to new active cases ratio
SELECT D1.date, (D1.hospital_beds_vacant * 1.0 / (D2.cases_positive - D2.cases_recovered - D2.deaths)) AS beds_cases_ratio from DL_patient_mgmt D1 JOIN DL_case_info D2 on D1.date == D2.date where beds_cases_ratio is not NULL and beds_cases_ratio >= 0
Merged with #26
Proposal