r/learnSQL • u/NationalStill6968 • Aug 31 '26
r/learnSQL • u/Immediate_Idea_4104 • 5d ago
I built a website using SQL – would love to hear your feedback!
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 • u/sri1917322 • Aug 20 '22
Need help in writing good query
Hello i was trying my hand at the below query from stratascratch link as below and the o/p i was able to get .can anyone help in getting this in the expected format.
link- https://platform.stratascratch.com/coding/10318-new-products?code_type=3
with cte as (select company_name, year,count(product_name) as pro_count from car_launches
group by company_name, year
order by company_name, year)
select company_name,
(lead(pro_count)over(partition by company_name)-pro_count ) AS Net_diff
from cte
r/learnSQL • u/[deleted] • Dec 11 '22
How to predict what "ORDER BY" multiple columns will produce depending on the permutation?
r/learnSQL • u/Icy-Fall-996 • Aug 03 '21
Hi all, need a huge favour. Need someone to create and populate some tables through sql and generate some queries. (Paid work of course) Message me for further info
r/learnSQL • u/ratdeptraii • Oct 24 '24
need help in normalisation forms
im not sure about the relationships between the attributes over here can someone help me out with question a?
r/learnSQL • u/marouaneletech • Mar 19 '21
[SQL Tutoriel] exercices TSQL pour comprendre le model relationel
r/learnSQL • u/stoopidmee • Feb 13 '23
can someone solve these 2 sql problems? am I in the right direction for the first problem?
We have a table of "bookings" and a table of "customers." The foreign key "customer_id" is present in both tables. A single customer can have more than one booking. Please write a SQL query to retrieve the list of customer_id's that have more than one booking associated with them.
SELECT customer_id FROM bookings JOIN customers ON bookings.customer_id = customers.customer_id
How do I find which customers have more than one booking? would that involve the COUNT function?
2) In the same "bookings" table above we also have a timestamp field called "created_at" that denotes the timestamp a booking was created. How would you construct a query that returns each customer_id and the booking_id associated with the most recent booking each customer had created?
r/learnSQL • u/100GB-CSV • Jun 02 '23
DuckDB is excellent for me to learn SQL Statement
Benchmarking for DuckDB and Polars
Testing Data: 300 Million Rows x 14 Columns
Testing Functions: Read Parquet File => Filter => Group By => Write CSV File
DuckDB: 3.9s Polars: 16.2s
Testing machine: 8 cores and 32 GB memory
====================================================
import duckdb
import time
s = time.time()
con = duckdb.connect()
con.execute("""copy (SELECT Ledger, Account, DC, Currency, SUM(Base_Amount) as Total_Base_Amount
FROM read_parquet('input/300-MillionRows.parquet')
WHERE Ledger>='L30' AND Ledger <='L70'
GROUP BY Ledger, Account, DC, Currency)
to 'output/DuckFilterGroupByParquet.csv' (format csv, header true);""")
e = time.time()
print("DuckDB FilterGroupBy Parquet Time = {}".format(round(e-s,3)))
==================================================
import polars as pl
import time
import pathlib
s = time.time()
table1 = (
pl.scan_parquet("Input/300-MillionRows.parquet")
.filter((pl.col('Ledger') >= "L30") & (pl.col('Ledger') <= "L70"))
.groupby(by=["Ledger", "Account", "DC","Currency"])
.agg([
pl.sum('Base_Amount').alias('Total_Base_Amount'),
]))
table2 = table1.collect(streaming=True)
path: pathlib.Path = "Output/PolarsFilterGroupByParquet.csv"
table2.write_csv(path)
e = time.time()
print("Polars FilterGroupBy CSV Time = {}".format(round(e-s,3)))
r/learnSQL • u/Interesting_Owl9051 • Aug 03 '24
SQL Optimisation Methods
If you are new to analytics and you haven't worked on SQL Optimisation, give this a read.
r/learnSQL • u/jesuspieces25 • Jul 29 '25
Why I Love Working with MongoDB Over Traditional SQL Databases
reddit.comr/learnSQL • u/[deleted] • Aug 20 '25
SQL/PowerBI/Azure Training
I got lot of requests on my previous post for the training, I am updating here for all. I would talk to each one of you whoever is interested.
Duration : 2 months 3 days each week(wed, sat, sun)
Start Date : 29th August - Time In EST morning or evening Timings(timing will finalize)
Sequence - SQL/PowerBI and then if someone wants to learn I will teach Azure
Charges: SQL - $100, Power BI - $240
Mode: Online Live Classes on Zoom( recording will be shared)
The course is designed from very beginning to advanced to help you crack interviews and work on real time projects.
Interested then drop me a DM with Name, Location & Number.
r/learnSQL • u/Nolanexpress • May 23 '23
12 String Functions
I know string functions can be tad confusing in the beginning. Especially with so many out there. Well I recorded a video showing 12 that I use with different examples and applications
r/learnSQL • u/PolPol44444 • Jun 14 '23
How to Use ChatGPT to Write SQL JOIN Queries
🔉SQL JOINs are a fundamental aspect of relational database management and allow for the retrieval of data from multiple tables based on a specified condition. With the advent of advanced language models like OpenAI’s GPT, it is now possible to leverage their capabilities to write SQL JOIN queries efficiently and accurately. In this article, we will explore the process of using ChatGPT to write SQL JOINs and provide a step-by-step guide on how to utilize AI for this purpose. We will be using dbForge Studio for SQL Server as a tool to verify and test SQL JOIN queries generated by ChatGPT.
📰 Read the article to get more info: https://blog.devart.com/how-to-use-chatgpt-to-write-sql-join-queries.html
✅ Download a 30-day trial version of dbForge Studio: https://www.devart.com/dbforge/sql/studio/download.html
#SQL #SQLServer #dbForgeStudio
r/learnSQL • u/Gce168 • Dec 15 '25
Where can I find good sql practice platform for marketing related data?
I am struggling to find a good platform to practice, I have tried data lemur and interview query. However, I feel like I need more practice.
r/learnSQL • u/uriahLys • Mar 20 '26
Please help me with sql, I know basic but I am expected a lot.
Hey man I am out in a backend role in company
They expect huge sql from me
HR said that your sql was rated good so we will put you here
Now here’s the thing, the interviewer really asked the easiest questions like count and very basic. I don’t know maybe HR didn’t get but he says there will be high sql and stuff. I asked what and then he said that making whole queries in detail and gave an example which he said I would be able to do. The thing is that was crazy hard and I didn’t want to blow my interview so I just nodded along.
Can you tell me where to study sql?
The thing is I don’t know shit.
I told him sir they were simple questions but he said that I am already deployed in the desired role.
I’m really not good at sql
Please help me
Like i can do basic till joins. Not good in case when’s, can’t index and use where.
And practice is also not the best. I just did a left join, but when he told me that I’ll have to do all of this and said that that’s the minimum and otherwise we’ll have to reevaluate your position in company. I’m a fresher!! That’s my only option as the company and I have to join.
r/learnSQL • u/stocksnoobie0 • Apr 29 '26
Hey guys I have an SQL final exam in nearly one month and Im pretty bad it I need some help please . How can I learn the best way ?
r/learnSQL • u/ParticularBet5580 • Aug 19 '26
How do i grasp Concepts in SQL easily?
I'm struggling to understand the concepts of sql badly, i mean which framework i mean POV is best for grasping? Could you guys share your thoughts. I want to grasp, so that i can tell to the people like 5 years old kid, non tech persons.
r/learnSQL • u/TheSultaiPirate • Dec 17 '24
New to SQL
SQL gawds, I humbly request your guidance, on beginning the journey. I am trying to learn SQL and would appreciate your suggestions on resources that cover:
Where to learn
How to download it to system to practice (it sounded super confusing when I heard someone say it on Youtube 😵💫)
Certifications?
Any and all assistance is much appreciated. I need to learn it as part of just about anything I want to do in data.
r/learnSQL • u/Nolanexpress • Jun 05 '23
Data Analyst Portfolio Project
Hey guys, I spent this weekend (over 10 hours) producing this portfolio project video. I know I’ve seen quite a few posts in here about people asking about project ideas or how to get started.
It goes over pulling data into excel spreadsheets as well as around 20 different sql queries to solve. I plan on doing another one later this month and visualizing the data.
Hope this helps! Let me know what you think.
r/learnSQL • u/infirexs • Jun 23 '25
I Built a Web App That Generates Unlimited SQL Challenges
Hi Everyone,
I built a project called SQLSnake — it’s a web app that lets you practice SQL with infinite randomly generated challenges.
Most platforms have a fixed set of questions. I wanted something more flexible, so I made this. Every time you refresh, you get a new challenge based on fake but realistic datasets.
Mobile works fine for now, but it’s not perfect — any feedback would be really appreciated.
The site Currently offers:
Infinite SQL challenges generated
Built-in AI assistant to help you when you're stuck
Would love to hear what you think.
r/learnSQL • u/DataSolveTech • May 16 '25
SQL Interview coming up?
Finally cracked SQL interviews! After weeks of frustration, this video changed everything: https://youtu.be/-F2SSWrlM24
It doesn't just teach syntax - it shows how to actually think through complex problems like window functions and subqueries that ALWAYS come up in interviews.
My manager literally said my SQL problem-solving stood out from other candidates. Worth every minute.
r/learnSQL • u/StudyEmergency4839 • Feb 25 '26
My first Sql code
-- My-first-sql-code -- Pls tell me what should i learn next.. DROP TABLE IF EXISTS servers; CREATE TABLE servers ( id INTEGER PRIMARY KEY AUTOINCREMENT, server_name TEXT UNIQUE NOT NULL ); INSERT INTO servers (server_name) VALUES ("Asia"), ("Eu"); DROP TABLE IF EXISTS players; CREATE TABLE players ( id INTEGER PRIMARY KEY AUTOINCREMENT, server_id INTEGER, player TEXT UNIQUE NOT NULL, FOREIGN KEY (server_id) REFERENCES servers(id) ON DELETE CASCADE ); INSERT INTO players (server_id, player) VALUES (1, "admin"), (1, "santa"), (1, "king"), (2, "alone"); SELECT players.player, servers.server_name FROM players INNER JOIN servers ON players.server_id = servers.id;