Home/Blog/SQL

// SQL

DataLemur vs StrataScratch: which to use for SQL interviews

Every example on this page was run on 27 November 2026 in the SQL database on this page, which is close to PostgreSQL, and the output under each one is what it printed. How we test these posts.

DataLemur vs StrataScratch comes down to how much of your interview is SQL. DataLemur is a smaller, SQL-first site with 54 free SQL questions and a Premium plan at $15 a month on 27 Nov 2026. StrataScratch is a larger data science platform with 1000+ coding questions, take-home projects and AI mock interviews, and a paid plan from $24 a month. Pick DataLemur for a SQL-heavy analyst interview and StrataScratch for a full data science loop.

Is DataLemur or StrataScratch better for SQL interviews?

DataLemur is the better fit when SQL is most of the interview, as in many data analyst and business intelligence loops, because its free set is mostly SQL with full solutions. StrataScratch is the better fit when SQL is one round among Python, statistics, product cases and a take-home, because it covers all of them. The SQL itself is much the same on both: joins, grouping and window functions over small business tables.

DataLemurStrataScratch
Best forSQL-heavy analyst interviewsFull data science, ML and AI loops
Free coding questions106, 54 of them SQL75+
Paid catalog250+ questions1000+ coding questions
Cheapest paid plan$15 a month$24 a month
ExtrasBook questions, job hunt courseInterview loops, projects, AI mock interviews

All figures in the table come from the pages linked below, checked 27 Nov 2026.

How many free questions do DataLemur and StrataScratch have?

DataLemur’s question list showed 106 questions without a Premium label on 27 Nov 2026, and 54 of them were SQL: 21 Easy, 19 Medium and 14 Hard (counted on DataLemur’s question list, checked 27 Nov 2026). The other free questions were 39 Python, 7 statistics, 5 machine learning and 1 probability.

StrataScratch’s free plan listed 75+ coding questions with solutions, hints and user solutions, against 1000+ on the paid plan (from StrataScratch’s pricing page, checked 27 Nov 2026). The free plan also included the SQL and Python learning paths and the interview loop pages by company and role. So for free SQL practice, DataLemur gives you more.

How much do DataLemur and StrataScratch cost?

DataLemur Premium cost $15 a month or $60 a year on DataLemur’s pricing page (checked 27 Nov 2026). A third option at $300, billed once, added lifetime access, a one-hour call with the founder, Nick Singh, and a signed copy of his book Ace the Data Science Interview.

StrataScratch cost $24 a month, $139 a year or $289 once for lifetime access on its pricing page (checked 27 Nov 2026). Every paid plan had the same content and differed only in billing and AI credits, and all came with a 5-day money-back guarantee. The same page showed a Black Friday code for 40% off the yearly and lifetime plans, so check the price on the day you buy.

What does StrataScratch have that DataLemur does not?

StrataScratch has the parts of a data interview that are not a coding question. StrataScratch’s home page (checked 27 Nov 2026) listed interview loops that lay out each round for a company and role, AI mock interviews for data scientist, ML engineer and AI engineer roles, and take-home projects in cloud-hosted Python notebooks. Its pricing page listed 500+ machine learning, statistics and system design questions on the paid plan, and coding questions in SQL, Python and R.

DataLemur’s paid plans add the statistics, probability and machine learning questions from Ace the Data Science Interview, and the yearly and lifetime plans include a video course on resumes, portfolio projects and behavioral interviews. It has no take-home projects or mock interviews.

Which should you use for a data analyst or data science interview?

Use DataLemur first for a data analyst interview: work through its 54 free SQL questions, then pay for a month if you want the rest. Use StrataScratch first for a data scientist or ML engineer interview, where a take-home, Python data work and statistics come up as often as SQL. If you can only pay for one, pick the site whose extras match the rounds you have actually been told about.

What kind of SQL question should you be ready for?

Both sites ask for business metrics, and a rate is one of the most common. Here is an original question of that kind: for each campaign, what percentage of ad impressions were clicked? The clicked column holds 1 for a click and 0 for none, and the first attempt counts it:

WITH impressions(impression_id, campaign, clicked) AS (
  VALUES (1, 'spring', 1), (2, 'spring', 0), (3, 'spring', 0),
         (4, 'summer', 1), (5, 'summer', 1), (6, 'summer', 1), (7, 'summer', 0),
         (8, 'winter', 1), (9, 'winter', 1)
)
SELECT campaign, ROUND(100.0 * COUNT(clicked) / COUNT(*), 1) AS click_rate
FROM impressions
GROUP BY campaign
ORDER BY campaign;

Output

campaignclick_rate
spring100
summer100
winter100

The query runs without an error and says every campaign had a perfect click rate. COUNT(clicked) counts the rows where clicked is not NULL, and a 0 is not NULL, so it counts every impression, clicked or not. Add the values up instead:

Use SUM(clicked) to count the clicks, and keep COUNT(*) for the impressions.

WITH impressions(impression_id, campaign, clicked) AS (
  VALUES (1, 'spring', 1), (2, 'spring', 0), (3, 'spring', 0),
         (4, 'summer', 1), (5, 'summer', 1), (6, 'summer', 1), (7, 'summer', 0),
         (8, 'winter', 1), (9, 'winter', 1)
)
SELECT campaign, ROUND(100.0 * SUM(clicked) / COUNT(*), 1) AS click_rate
FROM impressions
GROUP BY campaign
ORDER BY campaign;

Output

campaignclick_rate
spring33.3
summer75
winter100

The PostgreSQL manual on aggregate functions defines count(expression) as the number of input rows where the value is not null, and sum as the sum of the values. A grader compares the whole result, so the first query fails even on the rows where it looks close. Another counting mistake is in the DataLemur free tier post, and StrataScratch is set against LeetCode in StrataScratch vs LeetCode.

Where else can you practice SQL interview questions?

Prepshotz is free during its beta, with no credit card, and grades each SQL query by running it against a real database, with hints and feedback built around your output. Its catalog is much smaller than DataLemur’s or StrataScratch’s, and each account can build 5 goal-built tracks during the beta. The SQL interview practice guide has a study plan, DataLemur alternatives covers LeetCode and HackerRank too, and the comparison page sets the sites side by side.

Whether StrataScratch is free, and how far its free plan goes, is a separate question with an answer of its own. Whether DataLemur is free is answered in the DataLemur free tier post linked above.