Compare department performance by calculating the completion rate of visits. For each department, return the department name, total visits, completed visits, and the completion rate as a percentage (rounded to 1 decimal). Sort by completion rate descending.
Schema
🔑idINT
first_nameTEXT
last_nameTEXT
specialtyTEXT
🔗department_idINT
emailTEXT
phoneTEXT
hire_dateTEXT
salaryREAL
postgresql
Run your query to see results
Press Ctrl + Enter to execute