u/thequerylab

1,391 post karma · 47 comment karma · joined Mar 2026 · moderator

  1. 7points

    Before your next SQL interview, keep this post handy - SQL Execution Order (Part 5) [Discussion]

    0 comments · source

  2. 90points

    Before your next SQL interview, keep this post handy - SQL Execution Order (Part 5) (self.learnSQL)

    10 comments

  3. 0points

    Before your next SQL interview, keep this post handy - CTEs vs Subqueries (Part 4) [Discussion]

    1 comments · source

  4. 107points

    Before your next SQL interview, keep this post handy - CTEs vs Subqueries (Part 4) (self.learnSQL)

    13 comments

  5. 1points

    Before your next SQL interview, keep this post handy - WHERE, GROUP BY and HAVING (Part 3)

    0 comments · source

  6. 109points

    Before your next SQL interview, keep this post handy - WHERE, GROUP BY and HAVING (Part 3) (self.learnSQL)

    8 comments

  7. 1points

    Before your next SQL interview, keep this post handy - SQL JOINs (Part 2) [Discussion]

    1 comments · source

  8. 70points

    Before your next SQL interview, keep this post handy - SQL JOINs (Part 2) (self.learnSQL)

    4 comments

  9. 0points

    Before your next SQL interview, keep this post handy - SQL Window Functions (Part 1) [Discussion]

    1 comments · source

  10. 123points

    Before your next SQL interview, keep this post handy - SQL Window Functions (Part 1) (self.learnSQL)

    10 comments

  11. 1points

    If you have an SQL interview soon, don’t ignore these small things!!!! (Part 10)

    0 comments · source

  12. 151points

    If you have an SQL interview soon, don’t ignore these small things!!!! (Part 10) (self.learnSQL)

    11 comments

thequerylab

Agreed!. Thanks. I modified it

thequerylab

Can you please elaborate more?

thequerylab

PostgreSQL's docs list SELECT before ORDER BY and LIMIT in its logical processing order:

postgresql.org

You're right about the optimizer, but that's physical execution, not logical order.

thequerylab

Few seconds of silence is totally normal. You don't have to explain every single thought.

I would explain the approach first, then talk through the important parts while coding. Practicing under a timer helps a lot too.

You can use TheQueryLab mock interviews for this - feels more like an actual interview and you get a scorecard after.

Definitely helps with the pressure part.

thequerylab

Thanks. Hope this is helpful!

thequerylab

If your interview is few days away, dont't just read SQL - paractice problems. That's how you find ths gaps before the interviewer does!

thequerylab

You can try TheQueryLab. It has a SQL from Zero to Confident course if you want to learn alongside practice, and there are also quite a few interview-style SQL problems, including harder ones. Might be worth checking out.

https://www.thequerylab.com/

thequerylab

If you’re starting from zero, I’d suggest learning the basics alongside solving problems.

You can check out TheQueryLab’s “SQL from Zero to Confident” course - it’s structured around learning concepts and then practicing them

https://www.thequerylab.com/

thequerylab

The best way to learn SQL is by actually practicing problems, not just watching tutorials.

Start with the basics - SELECT, WHERE, GROUP BY, JOIN, subqueries and then move into window functions, CTEs, etc. Try solving problems yourself first, even if you get stuck. That's where you really start understanding the concepts.

You can enroll for this free SQL from Zero to Confident Course which will help you learn by practicing.

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

thequerylab

The best way to get really good at SQL is to understand the concepts and patterns, not just memorize syntax. That comes mainly from practicing different types of problems and understanding why a particular approach works.

You can create your own sample data and experiment with it, or use a practice platform like TheQueryLab where you can work with different datasets and problems. The important part is to actually write the queries and try to understand the pattern behind each problem.

thequerylab

Yes its supported by most of the databases

thequerylab

I feel all problems with messy data are where you learn the most. Clean datasets make SQL look easy, but NULLs, duplicates, missing records, edge cases, etc. really force you to understand the concepts.

thequerylab

For structured learning and practicing interview style problems you can give it a try on TheQueryLab. https://www.thequerylab.com/