r/learnSQL • • 13h ago

Free beta: practice SQL on a messy hotel database, in your browser (looking for testers)

2 Upvotes

Site: https://datagolive.com

Project to test: https://datagolive.com/p/pine-pier

I built a browser game to practise SQL on a real, messy SQL Server database: you are a

junior analyst at a fictional hotel group, 25 tasks over 5 days, answers checked

automatically, nothing to install. I'm looking for beginners (and anyone who knows SQL)

to try it and tell me honestly what is confusing.

Good to know: the GitHub sign-in creates a public repo with your answers, the optional

"Ask Gus" review is AI (it sends your SQL to Anthropic), it's free in the beta but paid

later.

Invite-only for now: sign in with GitHub on the project page, then comment here or DM me

and I'll invite you (usually within a day). The short form that pops up in the game after

each day helps me most, please don't press "Not now".

Many thanks! :)


r/learnSQL • • 16h ago

I have created an offline ad free android SQL practice app

0 Upvotes

Here's the content about the app -

1240 interview inspired questions from 25 top tech companies with detailed learning dashboard

365 interpreter mcqs with explanation for correct option

8 pre loaded schemas for free hand practice

Quick interview notes, Ultimate SQL Cheatsheet, Handbook of database internals and 50 system design case studies.

Great UI/UX loved by real world users of the app because of the toolbar over keyboard which helps to type queries on phone efficiently

Would you like to try the app?


r/learnSQL • • 17h ago

Website to train a specific pattern at a time dozens of times

1 Upvotes

So I'm looking for a way to filter all questions by specific patterns while also having question banks large enough that I could do each dozens of times.

does such a website exist?


r/learnSQL • • 17h ago

Learn SQL Faster In AI Era through Business scenarios | 5-Hour FREE SQL Course

44 Upvotes

Want to Learn SQL Faster in the AI Era?
I've published my 5-Hour FREE SQL Course on the GRASSP Acad YouTube channel!
📺 Watch here: https://www.youtube.com/watch?v=zexSoDiHX1s&t=3s

In this course, you won't learn SQL as a collection of independent queries or simply memorize syntax.

Instead, you will learn SQL through a Connected Business Story, where:
🔹 Every topic comes with a practical business context.
🔹 Each new concept builds on what you've learned previously.
🔹 You will understand why you are learning a concept and where it fits into real-world business scenarios.

From SQL fundamentals like SELECT, WHERE, GROUP BY, AGGREGATIONS to JOINs, CTEs, Window Functions, Normalization, Indexing, and Views, the learning journey is designed to connect concepts rather than teach them in isolation.

In this course you will also how to design tables and how to do proper data management like Creation, Updation and Deletion.

🎯 The goal is simple: Help you learn SQL faster through practical business scenarios and connected learning.
Feedbacks are welcome :) Happy learning :)


r/learnSQL • • 1d ago

SQL Server Interview Questions and Answers Part - 74

Thumbnail reddit.com
1 Upvotes

r/learnSQL • • 1d ago

SQL Server Interview Questions and Answers Part - 74

0 Upvotes

💡Looking for easy-to-understand SQL Server interview questions & latest updates?

Subscribe to our YouTube channel:

https://youtube.com/@MadeSimpleMSSQL

OR

Visit at https://madesimplemssql.com

#TSQL #TransactSQL #SQLQueries #DBA #SQL #diy #madesimplemssql #sql #data #ukreels #usa #usareels #usagirl #eu #uk #technews #india #indians


r/learnSQL • • 1d ago

Two ways to measure monthly price changes in ClickHouse

2 Upvotes

Monthly return and monthly price range sound similar, but they answer different questions. Here’s an example using candlestick data, where each row represents one price bar for a contract.

1. Which months had the largest net price moves?
First, group by contract and month using toStartOfMonth(timestamp). Then use argMin(close, timestamp) and argMax(close, timestamp) to get the first and last closing prices.

Calculate the percentage change between them, then sort by ABS(return_pct) to find the largest moves in either direction.

The important detail is that the first closing price is not the monthly opening price. This measures the change between the first and last observed closes.

2. Which contracts had the widest price range within a month?

Instead of comparing endpoints, calculate MIN(close) and MAX(close) for each contract within the selected month.

Then calculate 100.0 * (max_close - min_close) / nullIf(min_close, 0).

This measures the range of closing prices relative to the minimum close. It does not capture intrabar highs and lows or tell you which extreme occurred first.

Why the distinction matters

A contract could start at 100, reach 130, and finish at 101. Its net return would be small, while its closing price range could be large.

Neither metric alone proves that the market was trending or ranging.

One filtering detail worth checking

You can use HAVING COUNT(*) > 5000 to exclude groups with fewer observations, but that threshold only makes sense for a specific bar interval and trading calendar. A high row count alone does not prove the data is complete.

For timestamp filtering, use timestamp >= month_start AND timestamp < next_month_start to avoid guessing the final timestamp of the month.

How would you check for missing bars before comparing these monthly results?


r/learnSQL • • 2d ago

A free open source browser tool to learn SQL Lite on the Mondial Database

8 Upvotes

Hi guys, last semester I was taking a course on SQL as part of my data science class in Germany.

Because I mainly work on a tablet, there wasn’t really a good solution to train so I generated a tool that runs locally in the browser where you can learn SQL Lite.

In addition to that it shows the tables you select in your query and the connections between them when you join them.

It only works on the mondial Database which is popular with German unis to learn SQL.

As I don’t need it anymore but thought it was really helpful for me, I put it on the web for free and open sourced the code. I even added some of the old tasks we were given from Uni.

Hope it helps someone✌️

Website: https://mondial-sql.pages.dev/

Source code: https://github.com/hermelin-codes/mondial-sql


r/learnSQL • • 3d ago

need good sql resources

Thumbnail reddit.com
1 Upvotes

r/learnSQL • • 3d ago

I built a website using SQL – would love to hear your feedback!

2 Upvotes

Hey everyone!

I've been working on a website focused on helping people learn SQL, especially beginners who are just starting their database journey.

The goal is to make learning SQL easier through practical examples and hands-on practice.

I created this project to help people understand SQL concepts, practice queries, and improve their database skills.

I'd love for you to check it out and share your thoughts!

🌐 Website: https://sql-web-xi.vercel.app/

I'd really appreciate your feedback:

  • Is the learning content easy to understand?
  • What topics or features should I add?
  • What would make this website more useful for SQL beginners?

Thanks for checking it out! Any feedback is welcome.


r/learnSQL • • 3d ago

A 60-second SQL test with three traps. Most AIs I've graded fall for at least one.

5 Upvotes

I grade AI models on data questions for a living experiment, and the same three mistakes keep showing up. Here's a pocket version: paste it into whatever AI you use and see how it does. The database is SQLite.
sales (sale_id, amount):
1: 412.75 · 2: 268.40 · 3: 529.99 · 4: 145.20 · 5: 876.10 · 6: 233.65
7: 694.30 · 8: 358.55 · 9: 921.00 · 10: 187.45 · 11: 543.80 · 12: 476.25
returns (sale_id, one row per return event, 25 rows):
2, 5, 9, 2, 7, 3, 2, 11, 5, 12, 9, 4, 2, 7, 10, 5, 1, 9, 12, 4, 11, 8, 10, 13, 13
Task: write SQLite SQL returning exactly two columns: returned_sales (how many sales came back) and total_returned_sales (their total value, each sale counted once), and state the two numbers.
Answers, so you can grade it yourself:
Pass: 11 and 5,413.79, exactly two columns, SQL SQLite can run.
Trap 1: a total of 11,860.19 means it joined and summed, so sale 2 was counted 4 times. Counted twice (or four times).
Trap 2: a count of 12 means it counted sale 13, which is in returns but was never sold.
Trap 3: FETCH FIRST, EXTRACT, or more than two columns: wrong database or didn't follow the order.
On the full-size version of this case (500 return rows, 99 sales returned more than once), the counted-twice error invents $31,490.03. I've watched a model miss it twice in graded matches.
Curious what yours answered. Post the number it gave.


r/learnSQL • • 4d ago

Database design

21 Upvotes

Hey guys.

Gonna be real quick.

I know about databases but I struggle with database design either relational or non relational.

Do you have any resource that I can binge on and like solve this issue once and for all ?

Would appreciate it. Thanks in advance.


r/learnSQL • • 4d ago

Websites to practice SQL

4 Upvotes

Any websites to practice excercises of SQL in mobile ??

It should contains all excercise easy to understand and practice

Comfortably in mobile


r/learnSQL • • 4d ago

The one thing that made T-SQL stick for me: check figures on every exercise

4 Upvotes

I've been learning T-SQL on the Chinook sample database in SSMS, and the thing that changed everything was giving every exercise an expected answer to check against — a row count, a total, a specific value. Without it I was just guessing whether my query was right. With it, I know immediately, and the mistake teaches me something. Curious what worked for others here — what made SQL actually click for you?


r/learnSQL • • 4d ago

Free Excel and SQL level tests for beginners: 10 questions each, no sign-up. Tell me where they're too easy or too hard

Thumbnail reddit.com
3 Upvotes

r/learnSQL • • 5d ago

Guidance?

6 Upvotes

Years ago while incarcerated I earned a college cert for Microsoft apps which is now basically outdated. After talking with ChatGPT it recommended learning SQL because I mentioned that I really enjoyed my Access class and after a weird assessment i created noted I have a systems analyst kinda mind. "Investigative".

As a final project for that Access course I had to construct a library database from scratch using queries that could handle isbns, book details, borrower personal info, due dates, late fees (if applicable etc). It was hard but really really cool. Anyway, I went to the w3 site and that seems cool but I feel like I need a book, and to take notes and work on stuff on my computer. But I have no real idea how to begin or why id even do this esp vs Access refreshing???

Im a truck driver and would love to get out of it but im also a 8x felon. So...i dont wanna waste my time. Is SQL worth learning to move up or pivot? I see it occasionally in job searches. And how would you approach learning it if so? Lastly am I doing all of this to go like test somewhere and get a certification? Or is it a show me what you can do kinda thing?

- notable fact: I tried doing a boot camp for CSS a few years ago and got through the first level. At the second I kinda fell out of it due to lack of motivation even after taking a FrontPage class (in that program) but mostly due to talking myself out of it knowing my background. Plus I just wasnt really in love with CSS 🤷🏾‍♂️

Sorry this is so long but I figured some context may help.


r/learnSQL • • 5d ago

Understanding SQL patterns that cover 90% of interview questions

53 Upvotes

Instead of trying to memorize 100 different questions, it helps to learn the underlying patterns. I put together a walkthrough of the 17 patterns I see most often in MySQL interviews, breaking down the logic so you can recognize them instantly.

The core patterns covered:

  • Window Functions: Running totals, LAG for YoY/MoM growth, and 7-day moving averages.
  • CTEs & Recursion: Traversing hierarchies (like employee/manager trees).
  • Gaps & Islands: Finding consecutive login days (a classic tough one).
  • Ranking: Top N per group, 2nd/Nth highest salary.
  • Advanced Joins: Self-joins, monthly cohort retention, and pivot tables using CASE WHEN.

Why this approach helps:
When you see a question like "find the highest sales day," you shouldn't just start typing. You should recognize it as a "Ranking + Filtering" pattern. Once you know the pattern, the query writes itself.

I recorded a step-by-step video solving each of these 17 patterns with the exact queries and explanations of why they work. I also included the dataset/script so you can practice alongside it.

Walk-through:- SQL Interview Questions & Answers MySQL 17 Must Know Patterns

(Note: I'm sharing this because I've seen it help folks in my training sessions—if it helps even one person land a role, I'm happy!)

Question for the community: Which of these patterns trips you up the most in interviews? For me, it was always the "Gaps and Islands" problem.


r/learnSQL • • 5d ago

Text column is storing accented text weirdly

Thumbnail reddit.com
1 Upvotes

r/learnSQL • • 5d ago

I built ForgeSQL, a hands-on learning platform for SQL and data engineering

6 Upvotes

Sharing something I built: ForgeSQL, a browser-based learning platform for SQL and data engineering.

For SQL practice, there are guided exercises with sample tables, a query editor, results, and solutions you can compare with your own approach. You can start with joins and move on to window functions, then explore Python, file ingestion, pipelines, APIs and Kafka in the same workspace.

The idea is to try a query, inspect what happened, and change it until you understand why it works. It runs on DuckDB, so SQL dialect differences still apply.

It’s an early public beta. If you’re learning SQL, I’d appreciate hearing which exercises are helpful and where the instructions need work.

https://forgesql.clawiz.com/

Screenshot: https://forgesql.clawiz.com/assets/hotlink-ok/forgesql-workspace.png


r/learnSQL • • 5d ago

Day 78 — Hospital Management System: connecting the classes

3 Upvotes

Today I added BillingService, AppointmentService, and Schedulable to my Hospital Management System.

Writing each class was not the hard part. Connecting them so they work together was much harder, and it is the part no tutorial prepared me for. I used GPT as a mentor to understand the connections, not to write the code for me.

Tomorrow I will write the Main class to bring everything together.


r/learnSQL • • 5d ago

hi guys so i am a frontend dev and now i wanna expand into fullstack and for that i need to learn postgresql and about ORMs so what should materials should i check out which would help me to bridge to sql from only frontend?

3 Upvotes

r/learnSQL • • 5d ago

Is there any point proofreading SQL an agent wrote?

2 Upvotes

My manager has started pasting Claude-written SQL into Slack with "can you check this is right?". They always look fine on the page. Last week's joined to dim_customer_v2, which still exists but stopped updating in March. The one before used a revenue column that includes tax because it's the one with the obvious name. Both read perfectly well, both answers were wrong, and I only caught them because I happen to know the history of those tables. I mean, our BI tool's chat shows the SQL behind every chart now too, and I don't see how reading it would have caught either of those. Right now the only real check is whoever happens to remember the history of the tables.


r/learnSQL • • 5d ago

Sql skill level

Thumbnail reddit.com
1 Upvotes

Sql skill level

What level of expertise should I have in Sql, to carry out sql tasks in data annotation jobs ?

How about python ?

Does these two skills widen my task availability? What platforms can I target for ?

Kindly guide me !