r/learnSQL • u/tech-titan-2005 • 3h ago
How to learn postgresql
Did learning express. so as next step in thinking of learning postgresql instead of mongodb. so how. how did you learn. my stack is pern and is it good??
r/learnSQL • u/tech-titan-2005 • 3h ago
Did learning express. so as next step in thinking of learning postgresql instead of mongodb. so how. how did you learn. my stack is pern and is it good??
r/learnSQL • u/Practical-Memory-575 • 5h ago
r/learnSQL • u/420ball-sniffer69 • 6h ago
I know this is potentially an FAQ and the common answer will be to point me to a website or a course but I’m in a bit of a tricky situation in that I need to learn SQL for my job but my employer will only fund books rather than courses so I was wondering which books worked best for you guys? Thanks.
r/learnSQL • u/Possible_Seaweed_916 • 10h ago
There are two customers. Customer 1 has one paid order. Customer 2 has no orders.
I want both customers in the result, with paid order details where available.
SELECT c.id, o.status
FROM customers AS c
LEFT JOIN orders AS o
ON c.id = o.customer_id
WHERE o.status = 'paid';
This only returns customer 1. My first instinct would be to look at the join, but the row actually disappears because of the WHERE clause.
The fix here is to move o.status = 'paid' into the ON condition and remove the WHERE clause. That way the join looks for a paid order, and customer 2 still shows up with NULL for status.
r/learnSQL • u/SadPineappleWoman • 20h ago
SQL Error [1100]: Query execution failed: INVALID_FUNCTION_ARGUMENT: Invalid format: "01/07/2026" is malformed at "/07/2026"
Query execution failed: INVALID_FUNCTION_ARGUMENT: Invalid format: "01/07/2026" is malformed at "/07/2026"
INVALID_FUNCTION_ARGUMENT: Invalid format: "01/07/2026" is malformed at "/07/2026"
AI Aint helping
r/learnSQL • u/rushaydotexe • 1d ago
I have completed SQLbolt and I want to keep learning SQL for data analysis. I want to move on to the intermediate and advanced level in it.
Alsooo , I need to practice it too and I need project ideas which I can build and actually add in my portfolio.
Any help is appreciated.
r/learnSQL • u/Possible_Seaweed_916 • 2d ago
For me, joins are the best example of this. The diagram makes perfect sense. Then you join two tables, get twice as many rows as you expected, and suddenly you’re questioning everything.
What was that topic for you? And what finally made it click?
r/learnSQL • u/devious_elephant • 2d ago
I uploaded some YouTube videos explaining/solving SQL problems from HackerRank and DataLemur here
This would've been very useful for me when I first started learning SQL, so if you're starting your journey or need to practice some more, feel free to give it a look and let me know if you have any feedback. Thanks.
r/learnSQL • u/Gokul_00 • 2d ago
A while back I shared SQL Office Simulator, where you play a company's data analyst and answer stakeholder requests. A common ask was interview prep, so I pivoted into an Interview Mode.
What's new:
• 300 interview-style questions, from basic to advanced
• Modeled on what big tech and top startups actually ask: joins, window functions, CTEs, retention/cohorts, deduping, running totals, top-N per group, and so on
• Same PostgreSQL 16 sandbox, with hints and a schema viewer
• Free, with a quick signup to save progress
The video shows one question from start to submission.
Link: sql office
I'd love blunt feedback:
r/learnSQL • u/BigZealousideal9190 • 2d ago
I write T-SQL every single day at work. A lot of it I couldn't explain to you.
I have a folder of old scripts I copy from. When I need to dedupe something I grab the ROW_NUMBER() OVER (PARTITION BY ...) one and swap the column names. I could NOT tell you what changes if I mess with the ORDER BY inside the OVER.
A proc that always ran in a couple seconds started taking minutes, with zero code changes. Our DBA said "parameter sniffing," ran a recompile, and it was fast again.
I want to know how SQL Server builds a plan for my query and why it picks a different one some days.
r/learnSQL • u/SlightlyBeigeWall • 2d ago
Confused on what to learn next, have a thought of learning T-sql.
r/learnSQL • u/PresentationCalm1259 • 2d ago
r/learnSQL • u/RexExe • 3d ago
So currently, I'm walking in a non-tech company where my role is aviation security in India where I don't see any growth salary wise as well as in any kind of knowledge and skills. So I want to switch in a tech fild like data analysts , business analyst or product analyst. So i'm learning SQL because it's requiring mostly all tech field
So help me with my journey where I can learn a square. Basically, I'm looking for some sight where I get data. Because on YouTube, I don't get data, they show me table and I have to manually. You know, I don't know the details and it's very time consuming and it's not efficient for me.
It's so pleasant.Tell me where I can get our date.Real data on which I can run queries and as well as any website or youtube channel which is very good for learning
I'll appreciate for replying to this post.Do help me, guys.I need your support if anyone also learning.We can talk in d m like how we can help each other and grow together
r/learnSQL • u/delakh7 • 3d ago
Hey! I've been giving my first 10ish FREE SQL zoom sessions for people who want to learn or improve on SQL, and have more availabilities this week. Learning it helped get promoted so happy to help other people with theory and real exercises. let me know if interested
r/learnSQL • u/Fine_Top_3670 • 3d ago
When I was learning, the hard part was that you can't see what a query does. So I built SQL Bun. you write a query and watch each clause act on the rows, in the order the database actually runs it.
I wanted to make learning SQL interactive and fun.
There are 47 short lessons and 70+ interview-style problems. No account needed.
I'd love to know which parts are confusing.
r/learnSQL • u/Fun-Chicken6946 • 3d ago
Happy Holidays, r/learnSQL!
Somebody tampered with Santa's Nice List, and you're the North Pole's first-ever data elf.
This year, I decided to build a free, interactive Advent of SQL & NoSQL: 24 puzzles, one a day from December 1 to 24, designed to help you practice SQL while solving a Christmas mystery.
Every day, you get a bit more of the story and a question to answer with a query: which toys to build first, which children flipped from nice to naughty overnight, whose badge was used on the night shift, who walked through which door and when. By Christmas Eve, you'll have worked out who did it and fixed the list.
You can choose between three SQL databases, following the same story and working with the same underlying data:
There's also a MongoDB version for anyone interested in exploring NoSQL!
More details:
Whether you're just starting to learn SQL or looking to sharpen your existing skills, hopefully there's something here for you!
A new puzzle unlocks every day until Christmas Eve!
Pick your database here: https://visualeaf.com/advent-of-sql-and-nosql/
Completely free. No account, no installation, no database server needed.
I hope you all enjoy it, and happy holidays!
r/learnSQL • u/louischoi • 4d ago
Hi, Im studying sql grammars and tuning skils to get professional sql certification: SQLP (Korean SQL certification)
I had trouble with setting up database servers and data initalized, it take too many time after that I have no time for practice .... lol
So I made a Sandbox for studying SQL in web without server (yeah server is mine)
Can practice various sql grammars and tuning cases, it provides platforms: oracle, postgresql, ms-sql server (plus wiki for database)
I wish everyone who study sql focus on practicing (not setting up server and data)
It's totally free and no sign-up needed.
It covers:
- Basic queries (SELECT, WHERE, ORDER BY)
- Joins
- Subqueries
- Set operations (UNION, INTERSECT, EXCEPT)
- Window functions
- PIVOT
There's also a quiz mode: you get a real-world style requirement
(e.g. "Find the top 3 customers by total order amount in each region"),
write the SQL yourself, and run it against the sample data to check if you got it right.
Link: https://database.devio.sh/sql
it is early,so I really appreciate any feedback! Thank so much.
r/learnSQL • u/jakingo • 5d ago
I'm preparing for SQL interviews and curious about what companies actually focus on during technical rounds.
Do they mostly ask basic queries, JOINs, subqueries, window functions, or real-world problem-solving questions? Would love to hear what you experienced in your interviews.
r/learnSQL • u/Sufficient-Loan9565 • 5d ago
Hi there,
As a beginner of learning sql , I really don't know where the data analysts folks actually use of Views and materialised Views to analyse the real world data. Are people really use this in the real world problems day to day .
Help me to understand where is the real use case of these in the real world problems
r/learnSQL • u/ktgster • 5d ago
When I was learning SQL, most practice sites stopped at SELECT and JOIN, and anything harder meant setting up a local database. Then interviews asked about running totals, top-N per group and NULL edge cases I'd never practiced.
So I built Queryosity. You write real queries against typed tables (DuckDB, PostgreSQL-style) right in the browser, and each answer is checked against hidden test cases, not just the example output, so the edge cases actually matter.
What's in the SQL track:
There's a free plan and nothing to install. I'm a solo dev, so honest feedback helps a lot: which SQL topics or problem types are missing, and is anything confusing?
r/learnSQL • u/Background_Ask_1457 • 5d ago
I'm building a SQL learning platform (similar to SQL learning playgrounds) where users can write and execute SQL queries directly in the browser.
I'm exploring different approaches to handle SQL query execution while ensuring that one user's queries never affect another user's database or the original lesson dataset.
I've considered three approaches so far:
Database Transactions: Execute every user's query inside a transaction and use ROLLBACK after execution so that changes such as INSERT, UPDATE, and DELETE are not permanently saved.
Transaction Isolation Levels: Use PostgreSQL isolation levels to prevent concurrent users from interfering with each other's queries or data.
Separate Database Instances/Schemas: Create an isolated database environment for each user, seed it with the required lesson dataset, execute their queries, and reset or destroy the environment afterward.
My questions:
Which approach would you recommend for a production-ready SQL learning platform?
Are transactions with ROLLBACK sufficient, or are there limitations?
Would creating a separate database or schema for each user be too expensive when hundreds of users execute queries concurrently?
How do platforms like SQL playgrounds handle query isolation and concurrent execution?
Is there a better architecture, such as temporary databases, connection pooling, containers, or PostgreSQL snapshots?
Expected scale: Initially, around 100 concurrent users, with the possibility of scaling further.
I'm using Node.js, Express, PostgreSQL, Redis, and BullMQ for asynchronous query execution.
I'd appreciate suggestions based on real-world experience and trade-offs. Thanks!
r/learnSQL • u/Outside_Aioli_7201 • 6d ago
I'm currently learning SQL and trying to move beyond simple queries and textbook exercises.
Most exercises tell you exactly what to calculate, but real business problems seem much less structured.
Where do you find realistic SQL projects that require independent thinking?
I'm also researching what could make practical SQL learning resources more useful.
r/learnSQL • u/Wonderful-Row-2013 • 7d ago
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! :)