Skip to content

tablexpr/leetcode-sql-50

Repository files navigation

LeetCode SQL 50

Fiddling around with DataFusion, pandas, Polars, and PyArrow.

Select

problem_id title difficulty DataFusion pandas Polars PyArrow TotalCompletion
1757 Recyclable and Low Fat Products Easy 75.0%
584 Find Customer Referee Easy 75.0%
595 Big Countries Easy 75.0%
1148 Article Views I Easy 75.0%
1683 Invalid Tweets Easy 75.0%

Basic Joins

problem_id title difficulty DataFusion pandas Polars PyArrow TotalCompletion
1378 Replace Employee ID With The Unique Identifier Easy 75.0%
1068 Product Sales Analysis I Easy 75.0%
1581 Customer Who Visited but Did Not Make Any Transactions Easy 50.0%
197 Rising Temperature Easy 50.0%
1661 Average Time of Process per Machine Easy 50.0%
577 Employee Bonus Easy 50.0%
1280 Students and Examinations Easy 50.0%
570 Managers with at Least 5 Direct Reports Medium 50.0%
1934 Confirmation Rate Medium 50.0%

Basic Aggregate Functions

problem_id title difficulty DataFusion pandas Polars PyArrow TotalCompletion
620 Not Boring Movies Easy 75.0%
1251 Average Selling Price Easy 50.0%
1075 Project Employees I Easy 50.0%
1633 Percentage of Users Attended a Contest Easy 50.0%
1211 Queries Quality and Percentage Easy 50.0%
1193 Monthly Transactions I Medium 50.0%
1174 Immediate Food Delivery II Medium 50.0%
550 Game Play Analysis IV Medium 50.0%

Sorting and Grouping

problem_id title difficulty DataFusion pandas Polars PyArrow TotalCompletion
2356 Number of Unique Subjects Taught by Each Teacher Easy 50.0%
1141 User Activity for the Past 30 Days I Easy 50.0%
1070 Product Sales Analysis III Medium 50.0%
596 Classes More Than 5 Students Easy 50.0%
1729 Find Followers Count Easy 50.0%
619 Biggest Single Number Easy 50.0%
1045 Customers Who Bought All Products Medium 50.0%

Advanced Select and Joins

problem_id title difficulty DataFusion pandas Polars PyArrow TotalCompletion
1731 The Number of Employees Which Report to Each Employee Easy 50.0%
1789 Primary Department for Each Employee Easy 50.0%
610 Triangle Judgement Easy 50.0%
180 Consecutive Numbers Medium 100.0%
1164 Product Price at a Given Date Medium 50.0%
1204 Last Person to Fit in the Bus Medium 50.0%
1907 Count Salary Categories Medium 50.0%

Subqueries

problem_id title difficulty DataFusion pandas Polars PyArrow TotalCompletion
1978 Employees Whose Manager Left the Company Easy 50.0%
626 Exchange Seats Medium 50.0%
1341 Movie Rating Medium 50.0%
1321 Restaurant Growth Medium 50.0%
602 Friend Requests II: Who Has the Most Friends Medium 50.0%
585 Investments in 2016 Medium 50.0%
185 Department Top Three Salaries Hard 50.0%

Advanced String Functions / Regex / Clause

problem_id title difficulty DataFusion pandas Polars PyArrow TotalCompletion
1667 Fix Names in a Table Easy 50.0%
1527 Patients With a Condition Easy 50.0%
196 Delete Duplicate Emails Easy 50.0%
176 Second Highest Salary Medium 100.0%
1484 Group Sold Products By The Date Easy 50.0%
1327 List the Products Ordered in a Period Easy 50.0%
1517 Find Users With Valid E-Mails Easy 75.0%

Section Progress

group DataFusion pandas Polars PyArrow TotalCompletion
Select 100.0% 100.0% 0.0% 100.0% 75.0%
Basic Joins 22.22% 100.0% 0.0% 100.0% 55.56%
Basic Aggregate Functions 12.5% 100.0% 0.0% 100.0% 53.12%
Sorting and Grouping 0.0% 100.0% 0.0% 100.0% 50.0%
Advanced Select and Joins 14.29% 100.0% 14.29% 100.0% 57.14%
Subqueries 14.29% 100.0% 0.0% 85.71% 50.0%
Advanced String Functions / Regex / Clause 42.86% 100.0% 14.29% 85.71% 60.72%