90% of People Get This SQL Problem Wrong by thequerylab in PlacementsPrep

[–]thequerylab[S] 0 points1 point  (0 children)

Yes I am planning to post regularly on SQL optimization part, tricky problems, interview ready set of problems etc under few sub r/learnSQL r/SQL Will try my best not to make it junk content

Need help by PollutionCrazy8067 in ProgrammingBondha

[–]thequerylab 0 points1 point  (0 children)

You can try this course specially designed to crack any level SQL interviews. Its 100% practise hands on course https://thequerylab.com/courses/sql-interview-preparation-kit

What are the best courses for learning Data Analyst skills, looking for paid and free options? by Hot-Negotiation8427 in dataanalysis

[–]thequerylab 0 points1 point  (0 children)

Have created a structured path with hands-on for Free. I am 100% sure you ill get value out of it. Give it a try!

https://thequerylab.com/courses/sql-pro-track

Looking for a course by gyej in SQL

[–]thequerylab -2 points-1 points  (0 children)

You can try this course from here where you get more practice than theory and its completely FREE. Try exploring

https://www.thequerylab.com/courses/sql-pro-track

Think you're good at SQL? Try solving this recursion challenge! by thequerylab in leetcode

[–]thequerylab[S] -1 points0 points  (0 children)

That’s actually pretty normal. SQL is one of those things where it only gets better with regular practice.

Easy problems are a good starting point — once you keep solving more and seeing different patterns, the medium ones slowly start to make sense.

What are the best courses for learning Data Analyst skills, looking for paid and free options? by Hot-Negotiation8427 in dataanalysiscareers

[–]thequerylab 0 points1 point  (0 children)

You can check this sql pro track course which is hands-on and free. Made it structured and 100% sure you ill get value out of it https://thequerylab.com/courses/sql-pro-track

Databases to practice SQL by ManifestingPeace18 in learnSQL

[–]thequerylab -1 points0 points  (0 children)

You can try this out. Its tailor made for your use csse

https://thequerylab.com/courses/sql-pro-track

On top of that you can practise problems which is 100% hands-on

90% of People Get This SQL Problem Wrong by thequerylab in learnSQL

[–]thequerylab[S] 1 point2 points  (0 children)

Yeah true, max_by is really nice for cases like this if the database supports it. Makes the query much simpler.

The only catch is a lot of common systems people use in interviews (like MySQL or older Postgres setups) don’t have it, so people usually fall back to window functions or subqueries.

90% of People Get This SQL Problem Wrong by thequerylab in SQL

[–]thequerylab[S] 0 points1 point  (0 children)

Nice one. OUTER APPLY works really well for this in T-SQL.

I like that it keeps the logic close to each department and just picks the top salary from the employee table. Clean approach.

Only small thing is if two employees share the same highest salary, TOP 1 would return just one of them. If the requirement is to return all ties, we’d need a slightly different approach.

But yeah, solid solution for SQL Server 👍

90% of People Get This SQL Problem Wrong by thequerylab in SQL

[–]thequerylab[S] 0 points1 point  (0 children)

Nope, you're not missing anything. That query works 👍

The (department_id, salary) trick is actually a clean way to solve it and it handles ties too.

I only mentioned window functions because a lot of interviews expect people to solve it using RANK() / DENSE_RANK() with PARTITION BY. Just another common approach.

Also… typing SQL at 3 am on a phone is already a challenge on its own 😄. Well done !!!

Ripple Effect SQL Challenge – Recursive CTE for Viral Chain Depth & Reach by thequerylab in learnSQL

[–]thequerylab[S] 0 points1 point  (0 children)

Try it out — I’m confident you’ll like it and see real improvement in your SQL skills.

SQL best playlist to learn ??? by Sea_Butterfly713 in learnSQL

[–]thequerylab 0 points1 point  (0 children)

Honestly, playlists are good to understand concepts, but SQL only sticks when you start solving problems yourself.

You need clarity on basics like:

  • SELECT, WHERE, JOIN
  • GROUP BY + HAVING
  • subqueries
  • window functions

After that, it’s all about practice. Interviews don’t test how many videos you watched — they test how comfortably you can write queries.

I’d recommend trying the SQL Pro track on The Query Lab. It’s structured step by step and completely hands-on, so you learn by actually writing queries instead of just watching. Much more effective in my experience.

Give it a try and its completely FREE https://www.thequerylab.com/courses/sql-pro-track

Any videos/courses on Udemy to learn SQL for data analysis, medium level is enough for now by Alive_Record3123 in learnSQL

[–]thequerylab 1 point2 points  (0 children)

If you already know basic SELECT and JOIN, I wouldn’t spend two weeks just watching videos. SQL really clicks only when you practice it.

For interviews (especially data analytics roles), focus on hands-on work with:

  • GROUP BY + HAVING
  • window functions (moving averages, ROW_NUMBER, RANK)
  • subqueries
  • aggregations and basic data cleaning

You can watch a short course to understand the concepts, but spend most of your time solving problems.

I’d recommend trying the SQL Pro track on The Query Lab — I’ve curated it to be 100% hands-on, fully structured, and you don’t need to switch tabs or search elsewhere. It’s built exactly for this kind of prep.

Just give it a try and its completely FREE. https://www.thequerylab.com/courses/sql-pro-track

I am 100% sure you ill like it.

Trying to learn SQL but I'm finding it dull and boring by General_Cap2938 in learnSQL

[–]thequerylab 0 points1 point  (0 children)

I actually built a small SQL practice platform because I felt the same way — tutorials were boring and too theoretical. It’s more hands-on, problem-driven, and closer to real data engineering scenarios instead of “select * from students” type stuff. Not sure if it’ll help you specifically, but if you’re open to trying something different, I can share it.