Finance wants to see how billing is distributed across insurance plan types. For each plan_type, return the plan_type, total billed amount, total insurance_covered amount, total patient_responsibility, and the count of billing records. Sort by total billed descending.
Schema
🔑idINT
first_nameTEXT
last_nameTEXT
date_of_birthTEXT
genderTEXT
emailTEXT
phoneTEXTNULL
blood_typeTEXT
cityTEXT
stateTEXT
🔗insurance_idINTNULL
created_atTIMESTAMP
postgresql
Run your query to see results
Press Ctrl + Enter to execute