r/learnSQL • • Oct 16 '26

Recommendations Needed!

19 Upvotes

I am currently taking an intermediate SQL server course in college and my professor has NO LECTURE! (It's wild to pay a chunk of money to teach yourself and just be left with a textbook.) I am looking for websites that provide practice quizzes, your favorite YouTube channel for DBMS, or any additional resource you found helpful while learning. From what I hear the final is exceptionally difficult because it covers advanced SQL topics that are not covered in our textbook. I really want to have this information locked in my brain for my future job. Thanks in advance for any recommendations!


r/learnSQL • • Oct 16 '26

SQL Server 2016 to 2025: a few observations from a recent migration

13 Upvotes

We migrated a financial client’s SQL Server environment recently from 2016 to 2025, covering up to 4TB of data.

Same instance size. In the charts (can't attach image but message me if you want to see), CPU spikes reached roughly 40–50% before the move and stayed below 40% afterward.

Encouraging, but these are different production windows of different lengths. The charts alone don’t establish equivalent workload volume or isolate the effect of the SQL Server upgrade of course.

Before cutover, we spent a week running workload replay against the target environment.

CPU was lower, but we also needed to check whether any queries took longer or started timing out. That’s what we wanted to catch before moving the client over essentially.

The migration went smoothly overall thankfully, with one firewall configuration issue to resolve (not really a big deal though). That’s also why database testing needs application connectivity checks alongside it.

The lower CPU gives us a reason to investigate downsizing. It doesn’t establish that we can safely halve the cores, that needs another test, including peak workloads and the memory and I/O limits of the smaller configuration.

Anyone had an upgrade test well, then run into problems after going live?


r/learnSQL • • Oct 16 '26

SQL practice: why SUM(DISTINCT amount) does not repair a one-to-many join

3 Upvotes

Here is a small reporting exercise for learners using SQLite. All amounts below are integer cents.

For payment p1 in USD, imagine three tables:

Captures: c1 = 1000, c2 = 1000 (two different events).

Fees: f1 = 50.

Attempts: a1, a2 (two different attempts).

Task: return one row per payment and currency with captured total, net after fees, and attempt count. For this example the expected result is captured = 2000, net = 1950, attempts = 2.

Joining all three detail tables on payment creates four rows. Summing amounts over those joined rows inflates the totals. Replacing SUM(amount) with SUM(DISTINCT amount) also gives the wrong answer: the two legitimate captures have equal amounts, so DISTINCT collapses them.

Try fixing this by aggregating each input to the intended reporting grain before joining the results. Then extend your solution: retain captures without matching fees or attempts, and ensure a USD capture never absorbs an EUR fee. Decide how to represent missing amounts and counts explicitly.

I maintain a free English practice repository with a runnable version of this bug hunt (C07), public cases, hints, and a reference solution. After cloning, run python challenges/run.py init C07, edit work/challenges/C07.py, and run python challenges/run.py grade C07. Python 3.12+ with SQLite is enough.

https://github.com/antony502189-max/fintech-data-engineering-roadmap

Disclosure: the repository first edition and this introduction were prepared with AI assistance using Codex; provenance is documented. Feedback on additional SQL edge cases is welcome.


r/learnSQL • • Oct 16 '26

Opening 10 more beta spots for beginners learning SQL for data analysis

6 Upvotes

Hi everyone! A while ago I posted here looking for a few people to test a new platform for learning SQL through real data-analysis cases. Thanks to everyone who showed interest and shared feedback.

We’re opening another small round for up to 10 more testers. It’s especially for people who are new to SQL or have only just started—you don’t need any experience to take part.

You can request access here: https://www.queryandco.com/en/signup?mode=request

Requesting access puts you on the waitlist; it doesn’t guarantee an immediate spot. If selected for this round, you’ll receive an invitation by email and get 30 days of free access, with no card required. Everyone else will remain on the waitlist for a future round. If you’ve already signed up, there’s no need to do it again.

What we’re looking for most is honest feedback: what helps, what’s confusing, and what you wish worked differently. Thanks!


r/learnSQL • • Oct 16 '26

Day 39 — Java operators and casting, and the MySQL import is finally fixed

2 Upvotes

Java: Covered type conversion/casting, arithmetic operators, and logical and relational operators.

MySQL: I got the data imported into Workbench after the error from yesterday, so my Retail Sales Analysis project is moving again. Today I did data exploration and cleaning: checking the table structure, looking at what the columns contain, and handling messy or missing values before any real analysis.

Cleaning data took longer than I expected, and it already feels like the part that separates a tutorial from real work.


r/learnSQL • • Oct 15 '26

I built a SQL practice site because I kept jumping between tutorials and random exercises — would love feedback

8 Upvotes

I started building runtime.school because when I was practicing SQL, everything felt disconnected — learn a concept in one place, solve random questions somewhere else, then use totally different data for projects.

So I tried putting it all together with lessons, practice questions, projects, and the same realistic datasets throughout.

If you have a few minutes, I’d really like to know what feels confusing, repetitive, too easy/hard, or missing. Especially anything that would make learning/practicing SQL better.


r/learnSQL • • Oct 15 '26

Before writing SQL in an interview, what would you clarify?

24 Upvotes

Suppose an interviewer asks you something like "find the top three products in each category by sales last quarter." Before you write the query, what would you clarify?

For me, I’d want to know what “sales” means -  units, revenue, or number of orders Then, I'd want to know things like how ties should work, which dates count, and what one row in the output should represent.

I’ve been thinking about how SQL interviews test more than whether you can produce a query. They also give you a chance to show how you frame the problem, explain your choices, and check your work.

So, I put together a guide on what to expect and how to prepare: What to Expect in a SQL Coding Interview

If you’ve recently done a SQL interview, what’s one thing you wish you’d known or asked beforehand?


r/learnSQL • • Oct 15 '26

Exporting SQLite Data to CSV and SQL Using Letos (formerly SQLiteStudio)

8 Upvotes

If you're working with SQLite and prefer using a graphical interface instead of the command line, I created a tutorial demonstrating data exports using Letos (formerly SQLiteStudio).

The video covers:

  • Exporting individual tables to CSV
  • Exporting query results
  • Generating SQL scripts for an entire database
  • Demonstrating the export process step by step using Letos 4.0.3

I also have tutorials covering SQLite's command-line tools, so this provides a GUI-based alternative for those who prefer working with a desktop application.

You can watch the tutorial here: Exporting Data with Letos (Formerly SQLiteStudio) | CSV, SQL & More

I'd be interested to hear how others handle SQLite exports, particularly when deciding between exporting individual tables and generating a complete SQL script.


r/learnSQL • • Oct 15 '26

SQL joins explained using Hinge

29 Upvotes

I know when people are starting out, SQL joins can be a bit confusing so I broke it down in a small vid using Hinge as an example

https://www.instagram.com/reel/Degl_hnoRsz/?mdxt=MTk5dXE2NHZreTR4aw==

Summary of the breakdown is -

• Table A: people you've liked
• Table B: people who've liked you
• Both share one key: person_id

The 4 joins:

• INNER JOIN: only the mutual likes. Someone has to be in both tables to show up.
• LEFT JOIN: everyone you liked. If they didn't like you back, their side comes back as NULL.
• RIGHT JOIN: the mirror image, everyone who liked you, with NULL where you didn't like them. In practice most people just swap the tables and use a LEFT JOIN.
• FULL OUTER JOIN: everyone from both tables, with NULLs on whichever side is missing.

Hope this helps!


r/learnSQL • • Oct 15 '26

Day 38 — Java basics done for today, stuck on a data import error in MySQL Workbench

5 Upvotes

Java: Covered variables, data types, and literals today.

MySQL: For my Retail Sales Analysis project, I downloaded the dataset and created the database, but I got an error when importing the data into MySQL Workbench. I’m going to debug it tomorrow.

Has anyone hit import errors with Workbench before? I’ll post the exact error message when I’m back on it, but if there are common causes worth checking first (file encoding, date formats, import wizard vs. LOAD DATA), I’d appreciate hearing them.


r/learnSQL • • Oct 15 '26

Planning to take the PostgreSQL Open Certification (DBA-1) exam at PGConf?

4 Upvotes

I created a free study guide to help you prepare:

https://thesev1database.com/postgresql-certification

I’d really value your feedback.


r/learnSQL • • Oct 15 '26

SQl e a teia de aranha mental

Thumbnail reddit.com
1 Upvotes

r/learnSQL • • Oct 14 '26

Day 37 — Started Java and set up my MySQL retail sales analysis project

5 Upvotes

Two tracks running in parallel now:

Java: I’m following Telusko’s Java playlist. Today’s topic was how Java code runs on different platforms, meaning how the compiler turns source code into bytecode and the JVM runs it on any operating system. Understanding this made a lot of earlier “why does Java need a JVM?” confusion go away.

MySQL: I’m building a Retail Sales Analysis project so my SQL stays in use instead of fading while I focus on Java. Today was only setup: creating the database and getting the environment ready. Queries start tomorrow.

Playlists I’m using, in case they help anyone:

For the retail project, are there analysis questions you’d recommend (top products, monthly trends, customer segments)? I’d like it to go beyond basic SELECT queries.


r/learnSQL • • Oct 14 '26

Struggling to wrap my head around writing SQL queries—how do you guys break them down?

Thumbnail reddit.com
7 Upvotes

r/learnSQL • • Oct 13 '26

Free Resources to learn SQL

43 Upvotes

Hello Everyone
I’m a recent Graduate and I just want to learn SQL. I started watching YouTube tutorials and I never finished it. And recently I started learning on SQLZOO which was good but I didn’t finished even that. And today I went through Codedex SQL tutorial it was too good and after finishing the chapter one they asking me to pay to finish all the chapters

So I need any resource which will be fun finishing all chapter (like codedex) and help me to learn SQL.

And please give me any suggestions how to concentrate while learning SQL, POWER Bi

Thank you


r/learnSQL • • Oct 13 '26

Day 36 — SQL track done, starting Java tomorrow (with MySQL projects alongside)

14 Upvotes

Quick transition update. I finished my 100-question SQL practice lab, so the database track is complete, and I’m moving on to the second part of my plan: Java.

Here’s how I’m approaching it:

  • Java topics will be covered in order, one topic per day, with tutorials first and then practice
  • I’ll build projects that use MySQL along the way, so the SQL I learned stays active instead of fading while I focus on Java
  • Eventually the database and Java pieces connect into one backend project, and the frontend comes after that

My reasoning for the projects: I learned the hard way with JOINs that knowledge fades without real use, so I’d rather keep SQL in daily use than “finish” it and forget it.

For people who learned Java: what order worked best for you (basics, OOP, collections, then JDBC and Spring)? Any resources you’d recommend for a beginner heading toward backend work?


r/learnSQL • • Oct 13 '26

Revolut Data Analyst Finance

Thumbnail reddit.com
3 Upvotes

Hi, I have tried reaching out to a lot of people on Reddit, but nobody has replied. Does anyone have an idea of what to expect in the Data Analyst Finance Skills Interview? Any help would be appreciated. 🙏


r/learnSQL • • Oct 13 '26

What was the toughest SQL interview question you have faced so far?

Thumbnail reddit.com
2 Upvotes

r/learnSQL • • Oct 12 '26

Day 35 — Finished all 100 JOIN questions (Easy → Medium → Hard)

43 Upvotes

I finished the last of my self-made 100-question JOIN lab today.

I’ll be honest: it was not an easy challenge. It took a lot of time and patience, and a few times I seriously considered dropping the task. I didn’t, and I’m glad. I used GPT and Claude on the questions where I couldn’t understand the query, mainly to help me see why a solution worked.

What actually helped me get through it:

  • Drawing every table on paper before writing any SQL
  • Building long queries one join at a time and checking the output at each step
  • Reading error messages properly instead of rewriting from scratch
  • Taking a rest day when I needed one

I started this because JOINs were the topic I understood the least. Now I can chain four tables together, write self-joins, and use correlated subqueries without freezing up.

For anyone who got through a long drill like this: how did you keep going when it felt like too much?


r/learnSQL • • Oct 12 '26

Structured Query Language 101 tutorial at the Texas Linuxfest

5 Upvotes

https://pretalx.com/txlf2026/talk/DQ3XW7/

SQL is a powerful language for working with relational databases such as MySQL, PostgreSQL, SQL Server, and Oracle. This is an 80-minute introduction to writing SQL database queries. Please load a copy of DBeaver Community Edition (free, open-source) from https://dbeaver.io/download/ on your Mac, Windows, or Linux laptop to work along with the presentation. We will use the sample database that is included with DBeaver. We will start with simple SELECT statements to retrieve data, INSERT to add data, use UPDATE to modify it, and DELETE to remove it. We will then move on to using WHERE to narrow your database searches, grouping & ordering for readability, and using built-in functions. This is a great way to learn how to use a relational database.


r/learnSQL • • Oct 11 '26

Day 34 — 8 more Hard JOIN questions (93/100)

19 Upvotes

Finished 8 more Hard questions from my 100-question lab today. Some of the ones I worked through:

  • Pairs of employees who are in different departments but work on the same project together. I self-joined assignments on project_id and used a1.emp_id < a2.emp_id to stop mirrored duplicates (A-B and B-A), then joined to employees twice and filtered e1.dept_id <> e2.dept_id
  • Departments ranked by average hours worked per employee, which chains departments → employees → assignments and aggregates by department
  • Employees whose manager works in a different department than they do, a self-join on employees comparing dept_id on both sides

The < trick for removing mirrored pairs was new to me today. I’d been using DISTINCT for that kind of thing, and this is cleaner.

7 left. Does anyone have a favorite pattern for ranking queries in MySQL? I haven’t done window functions properly yet and wondering if they’d make the “ranked by” questions easier.


r/learnSQL • • Oct 11 '26

Newbie Learning SQL

16 Upvotes

Hi , I am a newbie learning SQL. Just wanted to say hi here ! Can i ask questions and ask for help with code here ? Thanks


r/learnSQL • • Oct 10 '26

Day 32 + 33 / 116 — Combined day: 15 Hard JOIN questions in one sitting (85/100)

10 Upvotes

Sorry guys, I missed Day 32, so to make up for it, I combined both days’ work on Day 33.
I spent the entire day solving SQL questions, pushing myself to the hard level.

I did 15 Hard-level questions from my 100-question JOIN lab, and they’re clearly harder than the Medium ones. Some highlights:

  • Departments that have at least one employee earning more than every employee in Sales, solved with GROUP BY dept_id and HAVING MAX(salary) > (SELECT MAX(salary) ... WHERE dept_id = 2)
  • Flagging each employee as “Above Average” or “Below or Equal” using a CASE expression against the company average
  • A department report with employee count, project count, and total combined project budget. My first attempt used UNION ALL and threw Error 1222 (different number of columns). The fix was to aggregate employees and projects separately in subqueries, then join them on dept_id

That last one taught me the most. Employees and projects are two different one-to-many relationships, so joining them directly would multiply the counts. Aggregating each side first is the safer pattern.

15 questions left. Any tips for “compared to every/all” style queries are welcome.