Project 2: SQL Data Analysis

Building and Exploring an Airbnb SQL Database for Data Understanding

Temp Text

The Problem/Opportunity:

New team members often struggle to understand complex datasets, especially when data is stored in raw formats such as CSV files without clear structure or documentation. This creates delays in onboarding and limits the ability to quickly extract business insights.

This project focuses on transforming raw Airbnb data into a structured SQL database and using it as a learning and exploration tool. The goal was to:

  • Build a clean and structured database from raw CSV files
  • Ensure data quality through cleaning, deduplication, and constraints
  • Help a new team member understand the dataset through guided SQL queries
  • Practice fundamental SQL skills while extracting meaningful business insights

The key stakeholders include:

  • New team members (data understanding & SQL learning)
  • Data teams (data quality & structure)
  • Business stakeholders (basic operational insights)

Key Insights:

Database Setup & Data Preparation

  • Created a dedicated database (Greek Airbnb) with proper collation settings (Greek_CI_AI) to support Greek text
  • Imported datasets (listings, calendar, reviews) into SQL Server
  • Standardized column data types based on the data dictionary
  • Adjusted data types (e.g., converting flags to varchar(3)) to improve readability
  • Cleaned the data by:
    • Identifying and removing duplicate records using ROW_NUMBER() and CTEs
    • Converting boolean fields (t/f) into more interpretable values (Yes/No)

Data Integrity & Constraints

  • Defined Primary Keys where applicable to ensure unique identification
  • Established Foreign Key relationships between tables (e.g., listings with reviews and calendar)
  • Applied NULL/NOT NULL constraints based on actual data conditions
  • Ensured overall data consistency and reliability for querying

SQL Analysis & Business Exploration

Developed a series of SQL queries to help explore and understand the dataset:

Supply & Activity Metrics
  • Total listings, reviews, and bookings
  • Number of unique hosts
Geographical Insights
  • Unique neighborhoods and listing distribution by area
  • Percentage of listings per neighborhood using subqueries
Host Analysis
  • Comparison between superhosts and non-superhosts
  • Listings count per host (including host names)
  • Hosts with profile pictures
Pricing Analysis
  • Listings within specific price ranges (e.g., 0–100€)
  • Average price per neighborhood
  • High-value areas (>200€/night)
  • Property types with the highest average price
Demand & Engagement
  • Bookings per property type (based on availability data)
  • Most reviewed room types
  • Listings with no reviews (potential gaps in engagement)
Custom Filtering
  • Listings by location patterns (e.g., neighborhoods starting with specific letters)

The Outcome:

This project resulted in a fully structured SQL database and a comprehensive set of queries designed to both explore the data and support learning.

  • Transformed raw CSV files into a relational database
  • Ensured data quality and consistency through cleaning and constraints
  • Created practical SQL queries that answer real business questions
  • Built a resource that supports onboarding and SQL skill development
  • The final solution enables:
    • Faster understanding of Airbnb data for new team members
    • Hands-on SQL practice with real-world datasets
    • Foundational insights into listings, pricing, and demand patterns

Overall, this project demonstrates the ability to combine data engineering basics (data preparation & modeling) with analytical thinking (SQL querying & insights generation).

Tools & Technologies

  • SQL Server Management Studio (SSMS)
  • SQL (data cleaning, transformation, querying)
  • CSV data sources