Find doctors who have both more than 5 completed visits AND total billing exceeding 5000. Return doctor full name, completed_visits, and total_billed (rounded to 2 decimals). Order by total_billed 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