83

Doctor Revenue Report

HardJOINCOUNTarithmetic

Problem Description

Write a SQL query to calculate total consultation revenue for each doctor.

Expected Columns

  • doctor_name
  • specialization
  • total_patients
  • total_revenue

Example Output

| doctor_name | specialization | total_patients | total_revenue | |-------------|----------------|----------------|---------------| | Dr. Arun Chatterjee | Cardiology | 3 | 4500 | | Dr. Rakesh Sinha | Neurology | 3 | 6000 | | ... | ... | ... | ... |

Hints

Unlocks after 2 more attempts
Submit your solution to unlock hints

Related Topics

JOINCOUNTarithmeticGROUP BY
//#83 Doctor Revenue Report
Hard

Loading schema...

Loading editor...

No results yet

Run a query to see results