Skip to content

My LeetCode SQL 50 solutions using MS SQL Server syntax

Notifications You must be signed in to change notification settings

ziaroque/leetcode-sql-50

Repository files navigation

LeetCode SQL 50 Solutions

Overview

The SQL 50 on LeetCode touches on basic to intermediate SQL topics that includes easy, medium, and hard level questions on topics below.

This github repository contains my solutions for the Top SQL 50 problems using MS SQL Server syntax.

Table of Contents

Select

# Problem Level Status
1757 Recyclable and Low Fat Products Easy Solved
584 Find Customer Referee Easy Solved
595 Big Countries Easy Solved
1148 Article Views Easy Solved
1683 Invalid Tweets Easy Solved

Basic Joins

# Problem Level Status
1378 Replace Employee ID With The Unique Identifier Easy Solved
1068 Product Sales Analysis I Easy Solved
1581 Customer Who Visited but Did Not Make Any Transactions Easy Solved
197 Rising Temperature Easy Solved
1661 Average Time of Process per Machine Easy Solved
577 Employee Bonus Easy Solved
1280 Students and Examinations Easy Solved
570 Managers with at Least 5 Direct Reports Medium Solved
1934 Confirmation Rate Medium Solved

Basic Aggregate Functions

# Problem Level Status
620 Not Boring Movies Easy Solved
1251 Average Selling Price Easy Solved
1075 Project Employees I Easy Solved
1633 Percentage of Users Attended a Contest Easy Solved
1211 Queries Quality and Percentage Easy Solved
1193 Monthly Transactions I Medium Solved
1174 Immediate Food Delivery II Medium Solved
550 Game Play Analysis IV Medium Solved

Sorting and Grouping

# Problem Level Status
2356 Number of Unique Subjects Taught by Each Teacher Easy Solved
1141 User Activity for the Past 30 Days I Easy Solved
1070 Product Sales Analysis III Medium Solved
596 Classes More Than 5 Students Easy Solved
1729 Find Followers Count Easy Solved
619 Biggest Single Number Easy Solved
1045 Customers Who Bought All Products Medium Solved

Advanced Select and Joins

# Problem Level Status
1731 The Number of Employees Which Report to Each Employee Easy Solved
1789 Primary Department for Each Employee Easy Solved
610 Triangle Judgement Easy Solved
180 Consecutive Numbers Medium Solved
1164 Product Price at a Given Date Medium Solved
1204 Last Person to Fit in the Bus Medium -
1907 Count Salary Categories Medium -

Subqueries

# Problem Level Status
1978 Employees Whose Manager Left the Company Easy Solved
626 Exchange Seats Medium -
1341 Movie Rating Medium -
1321 Restaurant Growth Medium Solved
602 Friend Requests II: Who Has the Most Friends Medium -
585 Investments in 2016 Medium -
185 Department Top Three Salaries Hard Solved

Advanced String Functions / Regex Clause

# Problem Level Status
1667 Fix Names in a Table Easy -
1527 Patients with a Condition Easy -
196 Delete Duplicate Emails Easy Solved
176 Second Highest Salary Medium Solved
1484 Group Sold Products By The Date Easy -
1327 List the Products Ordered in a Period Easy -
1517 Find Users With Valid E-mails Easy Solved

About

My LeetCode SQL 50 solutions using MS SQL Server syntax

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages