Skip to content

A collection of advanced SQL solutions for real-world business scenarios from Big Tech companies (Meta, Stripe, Airbnb). Focused on complex data manipulation, CTEs, and Window Functions.

Notifications You must be signed in to change notification settings

supaphol170/SQL-Interview-Challenges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ SQL Interview Challenges: Data Engineer & Data Analyst

Welcome to my SQL Practice Repository! This repository contains my solutions to real-world SQL interview questions from top tech companies. I use these challenges to sharpen my data manipulation, aggregation, and analytical skills.

🏒 Companies Included

I have solved data scenarios based on business cases from:

  • Airbnb: Pricing strategies and host earnings analysis.
  • Amazon (Prime Video): Content engagement and viewership tracking.
  • LinkedIn: User engagement scoring and content type performance.
  • Meta: Ad performance, custom audiences, and cost per conversion.
  • Microsoft (Teams): Data security, file sharing, and risk identification.
  • Stripe: Loan repayment success rates and business revenue variability.

πŸ› οΈ Key SQL Skills Demonstrated

In these scripts, I have applied advanced SQL techniques to solve complex business logic, including:

  • CTEs (Common Table Expressions): Structuring complex multi-step queries for readability.
  • Window Functions: Using PERCENT_RANK() OVER() for percentile calculations.
  • Conditional Aggregation: Utilizing SUM(CASE WHEN ...) and AVG(CASE WHEN ...) for pivoting and targeted metrics.
  • String Manipulation: Applying SPLIT_PART() and concatenations (||) to clean and extract text data.
  • Date & Time Filtering: Using EXTRACT(), BETWEEN, and date logic to analyze time-series data.
  • Complex Joins & Aggregations: Joining Fact and Dimension tables (fct_ and dim_) to generate meaningful business insights.

πŸ“‚ Repository Structure

The SQL files are organized by company name. Inside each file, you will find the business question as a comment, followed by the optimized SQL query.


Disclaimer: All questions are sourced from interviewmaster.ai. Solutions are written by me as part of my continuous learning journey.

About

A collection of advanced SQL solutions for real-world business scenarios from Big Tech companies (Meta, Stripe, Airbnb). Focused on complex data manipulation, CTEs, and Window Functions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published