Skip to content

Siddharth-dataground/IDC_21days-SQLChallenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IDC_21days-SQLChallenge

Prerequisite

MySQL :

  • To install on Mac OS, you can follow this YouTube video. Link
  • To install on Windows OS, you can follow this YouTube video. Link
    Note :
    • You can follow any video or other method to download and install. I just provided an example here to install. Install carefully as per your system requirements.
    • I have used MySQL Workbench 8.0 version 8.0.41.

21-day Challenge for SQL by IDC [Indian Data Club] sponsored by DPDzero

In this Repo, I have uploaded day-wise challenges and the solution using my approach.
The main aim is to improve SQL knowledge by doing problems, improving our approach and improving logic building

About the dataset: Link

It's a hospital data set. There are a total of 4 tables.
1. hospital_staff.csv – List of hospital staff
2. hospital_patients.csv – Patient records
3. hospital_service_weekly.csv – Weekly service-level data
4. hospital_staff_schedule.csv – Weekly schedule

Challenges List

First, create data base and table structure using the Code

  • Day 1 : List all unique hospital services available in the hospital.Code
  • Day 2 : Find all patients admitted to the 'Surgery' service with a satisfaction score below 70, showing their patient_id, name, age, and satisfaction score.Code
  • Day 3 : Retrieve the top 5 weeks with the highest patient refusals across all services, showing week, service, patients_refused, and patients_request. Sort by patients_refused in descending order.Code
  • Day 4 : Find the 3rd to 7th highest patient satisfaction scores from the patients table, showing patient_id, name, service, and satisfaction. Display only these 5 records.Code
  • Day 5 : Calculate the total number of patients admitted, total patients refused, and the average patient satisfaction across all services and weeks.Round the average satisfaction to 2 decimal places.Code

About

21 days Challenge for SQL by IDC [Indian Data Club ]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published