CoreTrail

Find your next SQL problem

A starting list for StrataScratch, LeetCode, and DataLemur, with links back to the relevant lessons.

PracticeCheck the platform's selected dialect4 min read
On this page

Pick a place to practice

Platform Where to start How to use it with CoreTrail
StrataScratch Search by question name or ID Try the familiar problems below, then explain the grain and edge cases without your old solution.
LeetCode SQL 50 study plan Work through its sequence, keeping a short note on the mistakes you repeat.
DataLemur SQL question list Choose a weak topic, attempt a problem, then revisit the related concept.

Choose the SQL dialect before starting. Access, difficulty labels, and available editors can change; the original page is the source of truth. The level labels below are practice guidance. CoreTrail’s linked examples explain related techniques and may use different fixtures or assumptions from the platform question.

A starting list

Try the question before opening the related lesson. Each problem link opens the original platform in the same tab, so the browser’s Back button brings you here.

StrataScratch · Easy · Existence

Find all posts which were reacted to with a heart ↗

Return a post once even when it has several matching reactions.

Revisit the concept →
StrataScratch · Medium · Aggregation

Largest Olympics ↗

Count the right entity and handle tied maxima.

Revisit the concept →
StrataScratch · Medium · Aggregation

Apple Product Counts ↗

Reduce device events to user-level flags.

Revisit the concept →
StrataScratch · Medium · Rates

Spam Posts ↗

Distinguish a post denominator from a view denominator.

Revisit the concept →
LeetCode · Medium · Rates

Confirmation Rate ↗

Keep users with no activity and define the rate.

Revisit the concept →
LeetCode · Medium · Existence

Customers Who Bought All Products ↗

Require every product without counting repeated purchases twice.

Revisit the concept →
LeetCode · Medium · Dates

Restaurant Growth ↗

Aggregate to day grain before calculating a rolling metric.

Revisit the concept →
LeetCode · Hard · Windows

Department Top Three Salaries ↗

Compare distinct salary levels and preserve ties.

Revisit the concept →
DataLemur · Easy · Existence

Page With No Likes ↗

Find absent relationships and check null behavior.

Revisit the concept →
DataLemur · Easy · Aggregation

Histogram of Tweets ↗

Count per user, then count users per bucket.

Revisit the concept →
DataLemur · Medium · Dates

Repeat Purchases on Multiple Days ↗

Separate repeated events from activity on different dates.

Revisit the concept →
DataLemur · Medium · Windows

Top Three Salaries ↗

Rank within departments and apply the stated tie rule.

Revisit the concept →

Not sure where to start?

Start with Page With No Likes and Histogram of Tweets. Then try Largest Olympics, Confirmation Rate, and Restaurant Growth. Finish with a ranking problem and Customers Who Bought All Products. This sequence moves from identifying a population to composing several stages.

Once those feel familiar, use the filters to mix topics rather than solving ten nearly identical questions in a row. The mixed drills hide the technique and give progressive hints.

Keep a useful mistake log

After an attempt, record the mistake in one sentence: “I counted events instead of users,” “I removed unmatched rows,” or “I compared the previous observed month.” Add the smallest input that exposes it. Revisit that input a few days later without your original query.

A passing submission checks the platform’s cases. It does not prove that your query is efficient at scale. For that part, use the query-plan labs and compare execution evidence on larger data.

References

Type a concept, keyword, or function.