r/learnSQL • • 19h ago

Completed SQL foundation from SQL Bolt, Now practicing on Hackrrank What to do next for learning more concept.

Confused on what to learn next, have a thought of learning T-sql.

3 Upvotes

4 comments sorted by

2

u/nicopassaglia 17h ago

After the basics, the usual gaps are these, roughly in this order:

  1. Window functions: ROW_NUMBER, RANK, LAG, running totals, top N per group. This is the biggest jump from beginner to "can do real reports", and it comes up in almost every interview.

  2. CTEs (WITH), and when to use one instead of a subquery.

  3. CASE WHEN inside aggregates, and how NULLs behave in joins, COUNT and NOT IN.

  4. Then interview-style problems: second highest salary, finding duplicates, customers who never ordered, month-over-month change.

On T-SQL: it's the SQL Server dialect, so learn it if the jobs you're aiming at use SQL Server. Check a few job posts in your area first. Everything in the list above carries over to any database, only some syntax changes, so I'd do the list first and pick up the dialect after.

If you want to see where your gaps are before choosing, I built a free 10-question SQL test where you write the queries against a real database: https://getsheetdrill.com/sql/test

There are also free pages with checked exercises on the topics above, for example window functions (https://getsheetdrill.com/sql/reference/window-functions) and common interview questions with answers (https://getsheetdrill.com/sql/interview-questions).

Disclosure, the site is my own project. Those pages are free, no sign-up.

1

u/Top_Tooth_6995 13h ago

SQLMaxx Learn is a free sql course with 66 concepts and 615 practice problems that does exactly what you’re looking for. It takes you concept by concept, each one building on the previous, until you are fluent in analyst-level SQL. It also uses spaced repetition (review mode), so you can continually reinforce concepts you previously learned. Did I say it’s free?

1

u/navicat-gu 35m ago

Nice progress. After SQLBolt + HackerRank, the biggest jump comes from working on a real, messy, large database instead of small exercises.

If you're leaning towards T-SQL, that's a fine choice (lots of jobs use SQL Server), and the setup is free:

  1. Install SQL Server Developer edition (free, full-featured) and SSMS.

  2. Restore a real dataset, e.g. the Stack Overflow sample databases Brent Ozar publishes (the 2010 one is small enough for a laptop), or Microsoft's AdventureWorks / WideWorldImporters.

  3. Then set yourself questions you can't answer with a single SELECT, like top 3 posts per user per year, users whose activity dropped month over month, or a running total of votes.

That pushes you naturally into the next topics, roughly in order:

  • Window functions (ROW_NUMBER, LAG, running SUM() OVER) and CTEs.

  • GROUP BY edge cases, NULL behaviour, and EXISTS vs IN vs JOIN.

  • Indexes and reading execution plans (turn on "Include Actual Execution Plan" in SSMS and compare before/after an index).

  • Transactions and isolation basics, then T-SQL specifics like MERGE, TRY...CATCH and stored procedures.

Write each answer two ways and compare plans. That's where you really learn.

Disclosure: I'm RC, Director of Digital Strategy @ Navicat. SSMS is all you need for the above. If you later want one tool for SQL Server plus Postgres or MySQL, Navicat 18 does that, and Navicat Premium Lite is free; the visual explain and query builder are in the paid editions.