Compute Admission Fees by Insurance Status

Postgres Engine
Database Schema
Question (#57)
Hospital rule: patients with an even patient_id have paid insurance, and patients with an odd patient_id have not. The admission fee is $10 for insured patients and $50 for uninsured patients. Display a 'has_insurance' column with the values 'No' and 'Yes', and a 'total_admision_fee' column with the total admission fees of the two groups (insured = 'Yes', uninsured = 'No').
Expected Output
Query Editor
User Output Ready
Execute a query or press Ctrl+Enter to view results...
Databases & Questions
Hint
Map each patient to a fee based on whether the ID is even or odd, then group and sum. You need to query information from the admissions table.
Official Solutions
Select a solution...