Medical research wants to know the distribution of diagnoses. For each diagnosis, return the diagnosis, count, and what percentage of all visits it represents (as pct, rounded to 1 decimal). Order by pct descending.
Schema
🔑idINT
🔗patient_idINT
🔗doctor_idINT
visit_dateTEXT
diagnosisTEXT
notesTEXTNULL
follow_up_dateTEXTNULL
statusTEXT
postgresql
Run your query to see results
Press Ctrl + Enter to execute