2. Understanding the Medicare Readmission Dataset with SQL

Objective

After downloading the CMS Medicare Hospital Readmissions dataset, I imported it into SQL Server to better understand its structure before beginning the data cleaning process. Exploring the dataset first helped me identify the available fields and prepare for the SQL analysis that followed.

Step 1: Import the Dataset into SQL Server

I imported the downloaded CSV file into SQL Server using Microsoft SQL Server Management Studio (SSMS).

The dataset was imported into a database named:

Hospital_Readmissions

and stored in a table with the same name.

Step 2: Explore the Dataset Structure

Once the data was imported, I reviewed the table structure to become familiar with the available columns before writing SQL queries.

SELECT * 
FROM Hospital_Readmissions

This query allowed me to examine the dataset before performing any data cleaning or analysis.

Key Columns

Some of the most important columns in the dataset include:

  • Facility_Name
  • Measure_Name – identifies the reported clinical measure (for example, Heart Failure or Pneumonia)
  • Number_of_Discharges
  • Number_of_Readmissions
  • Excess_Readmission_Ratio
  • Predicted_Readmission_Rate

Step 3: Check Basic Statistics

Next, I summarized the dataset to understand its overall size.

SELECT
    COUNT(*) AS Total_Rows,
    COUNT(DISTINCT Facility_Name) AS Total_Facilities,
    COUNT(DISTINCT Measure_Name) AS Total_Conditions
FROM Hospital_Readmissions;

This query provided a quick overview of the dataset, including the total number of records, hospitals, and clinical measures.

Summary

In this step, I imported the CMS Medicare Hospital Readmissions dataset into SQL Server and explored its structure using simple SQL queries. Exploring the dataset before cleaning helped me better understand the available data and prepare for the next stage of the project.

Next

In the next post, I cleaned the raw dataset by addressing missing values, correcting data types, and preparing the data for SQL analysis and Power BI reporting.

Previous: Part 1. How to Download Medicare Hospital Readmission Data

Next: Part 3. Cleaning Medicare Hospital Readmission Data with SQL

Scroll to Top