Our notes on LeetCode

We wrote these notes when we read the LeetCode site for our SQL comparisons. For each note, you see the day of our check and a link to the page that we read.

LeetCode price and plans

  • LeetCode charges $35 a month for Premium, billed monthly, or $159 a year (about $13.25 a month). Checked October 23, 2026 (source)

LeetCode free use

  • You can open 105 of the 323 Database problems free. You need Premium for the other 218. Checked October 23, 2026 (source)

LeetCode account

  • You must log in or sign up to run or submit a query. Checked October 23, 2026 (source)

LeetCode query check and help

  • We could not run the check, because you must sign in to submit. LeetCode does not say how it compares your result with the expected result. On each of the 105 free Database problems, LeetCode gives an example output table, with the columns of the result table. On 93 of the 105, LeetCode also gives an order rule. For example, on 175 Combine Two Tables, LeetCode says "Return the result table in any order." Checked October 24, 2026 (source)

LeetCode SQL topics

  • In the SQL 50 study plan, you work through 7 sections. The first four are Select (5 problems), Basic Joins (9), Basic Aggregate Functions (8), and Sorting and Grouping (7). The last three are Advanced Select and Joins (7), Subqueries (7), and Advanced String Functions / Regex / Clause (7). We found no section for window functions. But some free Database problems are window-function tasks. In 185 Department Top Three Salaries (in the Subqueries section), you find the top three salaries in each department. LeetCode uses DENSE_RANK() OVER in its free solution. In 178 Rank Scores (free, not in the plan), you rank scores with no gaps between ranks. Checked October 23, 2026 (source)

LeetCode SQL engines

  • On a Database problem, you choose MySQL, MS SQL Server, PostgreSQL, or Oracle (or Pandas). Checked October 23, 2026 (source)

LeetCode content and size

  • LeetCode lists 323 Database problems. 105 are free, and the other 218 are for Premium members only. Checked October 23, 2026 (source)
  • There are 50 Database problems in the SQL 50 study plan, and all 50 are free. You still log in to run or submit a query. Checked October 23, 2026 (source)

LeetCode updates

  • We found no date from LeetCode on its Database problems. The newest Database problem is number 3832, "Find Users with Persistent Behavior Patterns". We found February 4, 2026 as the date of the oldest community solution to it, so LeetCode added the problem on or before that day. Checked October 17, 2026 (source)

LeetCode strengths and limits

  • LeetCode has 323 Database problems, and on each of the 105 free ones, you can answer in four SQL engines. Checked October 23, 2026 (source)
  • You must sign up to run or submit a query, and you need Premium for 218 of the 323 Database problems. Checked October 20, 2026 (source)

LeetCode in our SQL comparisons