Easy Questions
1. Retrieve all the columns for the first 10 records in the dataset.
2. Count the total number of visits recorded in the dataset.
3. List all distinct departments (Department ID) available in the dataset.
4. Retrieve the total treatment cost for all patients.
5. Get the average patient satisfaction score.
6. List all patient IDs and their corresponding provider IDs.
7. Count how many patients visited the emergency department
(Emergency Visit = 'Yes').
8. Find the most common Service Type in the dataset.
Intermediate Questions
9. Retrieve the total medication cost for each department.
10. Find the top 5 most expensive procedures in terms of Treatment
Cost.
11. Retrieve the number of visits per Provider ID, sorted in
descending order.
12. Find the number of patients who were admitted and discharged
on the same day.
13. Get the highest and lowest treatment costs for each Service
Type.
14. Find the total revenue generated from room charges.
15. Identify how many follow-up visits happened in a specific month
(e.g., February 2024).
16. Calculate the percentage of visits covered by insurance
(Insurance Coverage = 'Yes').
17. Retrieve the average length of stay for admitted patients
(Discharge Date - Admitted Date).
Advanced Questions
18. Rank the departments by total revenue generated (treatment
cost + medication cost + room charges).
19. Find the patient with the highest total hospital cost (sum of
treatment, medication, and room charges).
20. Identify which insurance provider covered the most procedures
and their total costs.
21. Find the top 3 providers with the highest average patient
satisfaction scores.
22. Calculate the readmission rate (percentage of patients who had a
follow-up visit within 30 days of discharge).
23. Identify the most common diagnosis for emergency visits.
24. Find the correlation between patient satisfaction scores and total
cost of treatment.
25. Determine the most common referral source for high-cost
patients (patients whose total hospital cost is above the 90th
percentile).
26. Identify trends in hospital admissions over time (group by
month/year).
27. Predict the probability of a follow-up visit based on past visit data
using SQL window functions.