All Posts

MySQL DISTINCT Clause

In order to remove duplicate rows, we use the DISTINCT...

Biggest Window Between Visits Problem

LeetCode 1709. Write an SQL query that will, for each...

MySQL ORDER BY Clause

The ORDER BY clause is used to sort the result-set...

MySQL SELECT Statement

The SELECT statement allows us to read data from one...

MySQL Tutorial List

A growing list of MySQL tutorials.

Total Sales Amount By Year Problem

LeetCode 1384. Write an SQL query to report the Total...

Sales By Day Of The Week Problem

LeetCode 1479. Write an SQL query to report how many...

Hopper Company Queries III Problem

LeetCode 1651. Write an SQL query to compute the average_ride_distance...


Get The Second Most Recent Activity Problem

LeetCode 1369. Write an SQL query to show the second...

Find The Quiet Students In All Exams Problem

LeetCode 1412. Write an SQL query to report the students...

Tournament Winners Problem

LeetCode 1194. Write an SQL query to find the winner...

Students Report By Geography Problem

LeetCode 618. A U.S graduate school has students from Asia,...

Report Contiguous Dates Problem

LeetCode 1225. Write an SQL query to generate a report...

Median Employee Salary Problem

LeetCode 569. Write a SQL query to find the median...

Market Analysis II Problem

LeetCode 1159. Write an SQL query to find for each...

Hopper Company Queries I Problem

LeetCode 1635. Write an SQL query to report the following...