This repository contains my solutions to the top 50 LeetCode SQL challenges implemented using Apache Spark DataFrame (PySpark) and Spark SQL.
I have used the provided pandas schema from the website and converted it into a Spark DataFrame before solving them. I employed Jupyter Notebooks for easy readability.
Each Jupyter Notebook contains both the problem statement and my solution. To practice, clone the repo and clear out the shells containing the solutions and write your own PySpark or Spark SQL code to solve the challenge.
- Replace Employee ID With The Unique Identifier
- Product Sales Analysis I
- Customer Who Visited but Did Not Make Any Transactions
- Rising Temperature
- Average Time of Process per Machine
- Employee Bonus
- Students and Examinations
- Managers with at Least 5 Direct Reports
- Confirmation Rate
- Not Boring Movies
- Average Selling Price
- Project Employees I
- Percentage of Users Attended a Contest
- Queries Quality and Percentage
- Monthly Transactions I
- Immediate Food Delivery II
- Game Play Analysis IV
- Number of Unique Subjects Taught by Each Teacher
- User Activity for the Past 30 Days I
- Product Sales Analysis III
- Classes More Than 5 Students
- Find Followers Count
- Biggest Single Number
- Customers Who Bought All Products
- The Number of Employees Which Report to Each Employee
- Primary Department for Each Employee
- Triangle Judgement
- Consecutive Numbers
- Product Price at a Given Date
- Last Person to Fit in the Bus
- Count Salary Categories