Can you answer the SQL question that came up in a Google data analyst interview?
▲ 0 r/SQL

Can you answer the SQL question that came up in a Google data analyst interview?

Not rhetorical. Here's one that's been reported from real Google data analyst screens:

For each month in 2024, find the top 3 search queries by total search volume. In case of a tie, include all tied queries.

Sounds straightforward. Most people reach for RANK() and get it wrong. The reason is how tied results interact with the top 3 cutoff. DENSE_RANK() is the right call and knowing why is exactly the kind of thing that separates people who pass SQL screens from people who don't.

Companies like Meta, Amazon, Netflix and Airbnb have their own versions of this. The specific tables and business context change but the underlying pattern is consistent enough that practicing real reported questions makes a noticeable difference.

I've been building out a Career Hub on QueryCase with SQL questions sourced from actual candidate reports at these companies. You write the solution in the browser and get a worked answer that explains the insight most people miss, not just the correct query. There's also a rapid-fire MCQ section for the non-SQL parts of data interviews: business metrics, A/B testing, stakeholder questions.

If you want to try the Google question above or a few others: querycase.com

Feedback on difficulty and question selection very welcome, still building it out.

https://preview.redd.it/019rqevp6fbh1.png?width=1065&format=png&auto=webp&s=08fb61b33bb73eab834ddf8e21432fe5756fb802

reddit.com
u/conor-robertson — 10 hours ago

Can you answer the SQL question that came up in a Google data analyst interview?

Not rhetorical. Here's one that's been reported from real Google data analyst screens:

For each month in 2024, find the top 3 search queries by total search volume. In case of a tie, include all tied queries.

Sounds straightforward. Most people reach for RANK() and get it wrong. The reason is how tied results interact with the top 3 cutoff. DENSE_RANK() is the right call and knowing why is exactly the kind of thing that separates people who pass SQL screens from people who don't.

Companies like Meta, Amazon, Netflix and Airbnb have their own versions of this. The specific tables and business context change but the underlying pattern is consistent enough that practicing real reported questions makes a noticeable difference.

I've been building out a Career Hub on QueryCase with SQL questions sourced from actual candidate reports at these companies. You write the solution in the browser and get a worked answer that explains the insight most people miss, not just the correct query. There's also a rapid-fire MCQ section for the non-SQL parts of data interviews: business metrics, A/B testing, stakeholder questions.

If you want to try the Google question above or a few others: querycase.com

Feedback on difficulty and question selection very welcome, still building it out.

https://preview.redd.it/j0n50qjcy1bh1.png?width=1065&format=png&auto=webp&s=dc2b4f07673f5033fd37558d478023dbb20ed2fc

reddit.com
u/conor-robertson — 2 days ago

350 signups, 1,500 cases completed in 2 weeks - built a detective mystery game for learning SQL

Built QueryCase solo over a few months and it's been live for just over two weeks now.

The pitch: SQL tutorials teach syntax fine but there's never a reason to care about the answer. You filter a fake employees table, get a result, close the tab, forget it by Thursday. So instead of exercises, you solve detective mystery cases. Real case briefing, real database, real SQL to crack it.

54 cases, five detective ranks, timed exams with shareable certificates, a free Sandbox with real datasets (IMDB, Spotify, NBA, Steam, Pokémon), and a no-hints Investigations mode for pressure. Runs entirely in the browser via DuckDB WASM.

On the business side: went with a one-time payment (£14.99) instead of subscription after running the numbers - most users finish the core path in 2-3 months, so lifetime value ends up roughly the same either way, minus the churn and refund overhead.

350 signups and 1,500 cases completed so far, mostly from Reddit and organic search, no ad spend.

Also just put it up on Product Hunt today if anyone wants to see the full thing:

https://www.producthunt.com/posts/querycase/maker-invite?code=AMxgTN

Happy to talk through the pricing decision, the DuckDB build, the numbers, anything.

u/conor-robertson — 6 days ago
▲ 12 r/ProductHunters+2 crossposts

Launched QueryCase today - a detective mystery game where the puzzles are real SQL queries

Hey r/ProductHunt - just launched QueryCase today after building it solo over the past few months.

The idea: SQL tutorials teach syntax fine, but there's never a reason to care about the answer. You filter a fake employees table, get a result, close the tab, forget it by Thursday.

QueryCase flips that. You're a detective. You get a real case briefing, a real database, and you write actual SQL to solve a mystery. The JOIN matters when a suspect has an alibi.

54 cases, five detective ranks, timed exams with shareable certificates, a free Sandbox with real datasets (IMDB, Spotify, NBA, Steam, Pokémon), and a no-hints Investigations mode for when you want pressure. Everything runs in the browser via DuckDB WASM, nothing to install.

It's live on Product Hunt today if you want to take a look: https://www.producthunt.com/p/querycase/querycase

Genuinely happy to answer anything - the build, the DuckDB implementation, the gamification decisions, why I went with a one-time payment instead of subscription. First launch, so any feedback is welcome too.

u/conor-robertson — 6 days ago
▲ 28 r/learnSQL+1 crossposts

The thing that makes window functions click: they keep every row instead of collapsing them

Window functions come up here constantly, and they're the wall a lot of people hit right after they're comfortable with SELECT, WHERE and JOIN. The syntax looks alien and most explanations open with "frames" and "partitions" and lose people immediately.

The idea underneath is much simpler than the wording suggests. A window function does the same calculation as GROUP BY, but instead of crushing each group down to one summary row, it keeps every row and writes the answer in a new column beside it. That's the whole trick. Running totals, rankings, "this row vs the previous one" are all just an aggregate that didn't collapse.

The clearest way to see it is side by side:

  • GROUP BY squad → 2 rows. One line per squad, the individual names are gone.
  • SUM(xp) OVER (PARTITION BY squad) → 5 rows. The same squad total, written next to every member, all five rows kept.

Same totals, different row counts. That gap is the entire concept.

A few things worth knowing once that lands:

  • ROW_NUMBER / RANK / DENSE_RANK look identical until there's a tie. ROW_NUMBER never ties (1,2,3,4). RANK ties then skips (1,2,2,4). DENSE_RANK ties without skipping (1,2,2,3).
  • The ORDER BY inside OVER() steers the calculation (what counts as "above" for a running total). The ORDER BY at the end of the query just sorts the output. Different jobs.
  • You can't filter on a window function in WHERE, because the rank isn't worked out yet when WHERE runs. Compute it in a CTE first, then filter. That wrap-then-filter shape is behind almost every "top N per group" query.

I put together an interactive version that shows all of this, a live leaderboard where you pick the function, toggle PARTITION BY and ORDER BY, and watch the column change without losing any rows. You can tap any computed value to highlight the exact rows it was built from: https://querycase.com/blog/sql-window-functions-explained

If you teach this or learned it recently, I'd love to know: is there a window function concept you wish someone had shown you visually that's missing? And are RANK vs DENSE_RANK and the top-N-per-group pattern explained clearly, since those are the two that seem to trip people up most?

u/conor-robertson — 12 days ago
▲ 6 r/micro_saas+2 crossposts

Looking for feedback on my Product Hunt launch video (first project, 200 users so far)

Hey everyone! 👋

I’ve been working on QueryCase, a gamified SQL learning platform where users learn SQL by solving interactive detective-style investigations and realistic business scenarios rather than following traditional tutorials.

The platform has been live for just over a week and has already reached 200 users, which has been exciting (and slightly terrifying!) as it’s my first ever project.

I’m planning a Product Hunt launch next week and have put together a short launch video. I’d love any feedback on the video, landing page, messaging, or first impressions before I launch.

Any thoughts would be hugely appreciated - thanks in advance!

u/conor-robertson — 14 days ago
▲ 93 r/DataAnalytics_India+2 crossposts

Why most people quit SQL tutorials (and what actually works instead)

The reason most people bounce off SQL tutorials isn't that SQL is hard. It's that nothing they're querying matters to them to keep them motivated!

You spend the first week writing SELECT name FROM employees WHERE dept = 'Sales' and technically you've written SQL. But there's nothing to discover, no reason to care whether you got it right, and no motivation to open the app tomorrow.

The fix isn't a better tutorial. It's querying data you actually care about.

Wrote a full breakdown on this including a learning framework, the six SQL concepts that cover 90% of real work, and how to pick the right dataset to keep yourself motivated: querycase.com/blog/how-to-learn-sql-fast

One of my first blogs so based on my own experience - happy to hear if there's anything you'd do differently or any other recommendations you have to improve SQL learning! 😄

u/conor-robertson — 16 days ago

What SQL interviews are actually testing (it's not just the syntax)

I've been in data analytics 7 years and the thing that separates people who get offers from people who don't usually isn't technical ability.

Before any interview, spend 30 minutes thinking about the company. What do they do? How do they make money? What does their data probably look like? A SaaS company lives and dies by retention, churn and engagement. An e-commerce company cares about repeat purchase rate and basket size. Walk in knowing that language and using it naturally.

But more than that, think like you already work there. If they ask you to investigate a churn spike, don't just write a query. Ask questions first. Has anything changed recently? Any new experiments running? Product updates? Pricing changes? That's what a real analyst does on day one and it's exactly what interviewers want to see.

The candidates who stand out aren't always the fastest at writing SQL. They're the ones who slow down, ask the right question, and make the interviewer feel like they're already thinking about the same problems.

Wrote a full breakdown on this including domain prep guides for different industries and a pre-interview checklist: querycase.com/blog/sql-interview-questions

One of my first blogs so based largely on my own experience in the industry. If there's anything critical I've missed or you'd do differently I'd genuinely love to hear it in the comments.

u/conor-robertson — 18 days ago
▲ 2 r/SaaS

At what point does a learning platform stop being a SaaS and become something you just buy?

I've been building QueryCase for the past few months. It's a SQL learning platform built around a detective theme - you solve mystery cases by writing real SQL queries. 54 cases, rank progression from Recruit to Chief Detective, a sandbox with real datasets (IMDB, Spotify, NBA stats), timed investigations.

I launched it as a subscription. Monthly and annual. Made sense to me at the time - Duolingo does it, DataCamp does it, Codecademy does it.

Then I sat down and did the maths on what I'd actually built.

If an average user goes through the Rookie cases, upgrades, works through all the cases, and then real life takes over - how long is that? Two months? Three? At £5.99/mo that's maybe £12-18 lifetime revenue per user. Meanwhile I'm managing churn, cancellations, and that one person who emails to ask why their card was charged.

A one-time payment of £14.99 captures almost exactly the same lifetime value per user with none of the overhead. So I've decided to change it.

The question I'm still sitting with is more fundamental:

When is something actually a SaaS vs a product you buy once?

My rough heuristic: if I can't clearly explain what new value a user gets in month two that they didn't get in month one, it's not a subscription.

By that logic, a finite learning course isn't a SaaS. It's a course. You buy it, you do it, you're done. The fact that I'm still building and adding content doesn't really change that - the user doesn't experience it as recurring value, they experience it as a thing they're working through.

Curious whether others have hit this question. Where do you draw the line? And if you've made a similar call, did it work out?

reddit.com
u/conor-robertson — 21 days ago
▲ 150 r/letscodecommunity+44 crossposts

I've been building a SQL learning platform for the past few months. It's called QueryCase and I'd love honest feedback

I've spent the last few months building something and I'm finally at the point where I want to share it properly rather than just quietly hoping people find it.

The idea came from a frustration I kept seeing (and feeling myself): SQL tutorials teach the syntax fine but there's never a reason to care about the answer. You filter a table called employees, get a result, and nothing happens. Your brain doesn't bother keeping it.

I wanted to try a different approach. QueryCase teaches SQL through detective investigations. You get a briefing from Chief Fox (our mascot), a real database to query, and a mystery to crack. The JOIN matters when a suspect has an alibi. The WHERE clause matters when you're trying to find who entered the building at 22:13. The SQL is the tool for solving something, not the point in itself.

Here's what's actually in it:

  • A structured learning path across 54 cases, going from Recruit through Rookie, Detective, Senior Detective, and Chief Detective. Each rank has drills and a level exam to pass before you progress.
  • Sandbox mode where you can explore real datasets (IMDB movies, Spotify, sports stats, Steam games) and run whatever you want with no pressure and no mystery attached. Just free exploration against actual data.
  • Everything runs in the browser using DuckDB WASM so there's nothing to install.

I'm a solo developer and this is genuinely early days. I'm sharing here because this community is exactly the kind of people I built it for, and I'd rather get honest feedback now than find out later I've built the wrong thing.

What's missing? What would make you actually stick with something like this versus what you've used before?

querycase.com if you want to take a look.

Any feedback appreciated!

u/conor-robertson — 3 days ago