Question: Please answer these questions by MySQL, include coding. 2. You are given a table of inpatient hospital admissions, which includes the patient ID, the admission
Please answer these questions by MySQL, include coding.

2. You are given a table of inpatient hospital admissions, which includes the patient ID, the admission ID, patient sex, admission and discharge dates for each admission, and their diagnosis-related group code (DRG) (excerpt shown below}. A DRG identies the underlying condition for which a patient is admitted. Single patients can have multiple admissions in this data set. Table 2. W110. ammonia E W W E 100001 1256 M 11112018 11412018 061 100002 3965 F 213012018 311512018 291 100003 5869 F 311412018 411512018 349 100004 9396 M 312012018 41112018 292 100004 0684 F 81312018 813012018 293 100005 3859 F 1012912018 1 111512018 291 100008 1849 M 711212018 712012018 543 100007 3498 M 11212018 111512018 470 100007 1350 M 81412018 811612018 471 a. Describe the steps you would take to review and clean this dataset for any data errors or inconsistencies. b. Write code to output a new table from Table 2 that only includes admissions that end before June 30, 2018. How many admission in the Table 2 excerpt would be included in the new table? Write code to output the number of unique members in this dataset. You are asked to identify all of the admissions for heart failure in this dataset. Heart failure .np admissions are identied as those with DRGs 291, 292, or 293. Write code to output a table that only contains the heart failure admissions. How many admissions in the Table 2 excerpt would be included in the new table? How many unique members in the Table 2 excerpt would be included in the new table
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
