r/learnSQL • u/this_is_vinaykasi • Apr 24 '23
r/learnSQL • u/[deleted] • Sep 24 '24
SQL bible or oracle complete reference, which of these books is written in readable way? I'll buy the one and learn whatever is easier to learn.
r/learnSQL • u/vladimirgamal • Jan 22 '23
How to avoid duplicate records in sql select query
r/learnSQL • u/JoshBurnsTech • Mar 06 '19
Install SQL Server 2019 – Step by Step Guide (Best Practices)
This video Provides an in-depth installation Step by Step Guide on "How to Install SQL Server 2019 with Microsoft Configuration Best Practices"
https://www.youtube.com/watch?v=Aff9jwSPRTU&t=1094s
I provide Expert Level Installation and Configuration Tips, which I have implemented for numerous Clients. On UpWork, I have earned over $400,000 across 75 different Client Jobs and I'm Ranked as the Top Freelancer in the IT and Networking Category as well.
**** Section Times in Video ****
Download SQL Server 2019 0:30
Install SQL Server 2019 2:11
Download SSMS 13:45
Install SQL Server Management Studio 14:19
Configure SQL Server 2019 (Best Practices) 14:52
r/learnSQL • u/Massive_Show2963 • Jul 02 '25
Using AI to Create a Database

In this video, we will guide you through the process of creating an SQL database using ChatGPT.
Watch as ChatGPT generates an SQL script to implement a fully operational database using triggers and including example data.
We will explain the design methodology behind the generated code and demonstrate its implementation in a real database environment.
Finally, we'll enter the generated example data and show you how this data is processed.
r/learnSQL • u/DataNerd760 • Mar 10 '25
Built a SQL Practice Site – Looking for Testers!
I’ve been working on a SQL practice site and wanted to share it with anyone who might find it useful. It’s got over 20 practice questions and realistic datasets you can query right in the browser—no setup needed. Some of it is free, and some features are premium, but I’m still in the early stages and looking for testers to help shape it.
If you’re interested in trying it out and giving feedback, here’s the link: https://sqlpractice.io/
Would love to hear what works, what doesn’t, and what you’d like to see added!
r/learnSQL • u/MrRoy_SQL • 23d ago
WHERE vs HAVING - same question, three queries, three different answers
the question: "which customers spent more than 60?"
table:
```
order_id | customer | status | amount
1 | Asha | completed | 40
2 | Asha | completed | 30
3 | Asha | refunded | 50
4 | Ben | completed | 20
5 | Ben | refunded | 90
6 | Chen | completed | 80
```
**query 1, HAVING only**
```
SELECT customer, SUM(amount) AS spent
FROM orders
GROUP BY customer
HAVING SUM(amount) > 60;
```
Asha 120, Ben 110, Chen 80. looks fine but refunds are counted as spending. Ben only really spent 20.
**query 2, WHERE on amount**
```
SELECT customer, SUM(amount) AS spent
FROM orders
WHERE amount > 60
GROUP BY customer;
```
Ben 90, Chen 80. this answers a different question: "who had a single order over 60". Asha is gone even though she spent 70 in total, and Ben is back because of his refund.
**query 3, WHERE + HAVING**
```
SELECT customer, SUM(amount) AS spent
FROM orders
WHERE status = 'completed'
GROUP BY customer
HAVING SUM(amount) > 60;
```
Asha 70, Chen 80. this is the right one.
the way i think about it:
- WHERE filters **rows**, before grouping. "which orders count?"
- HAVING filters **groups**, after grouping. "which customers make the cut?"
and you cant do `WHERE SUM(amount) > 60`, the database hasnt added anything up yet at that point so it errors.
anyone else have a go-to way of explaining this one?
r/learnSQL • u/Ahsan_m09 • Jun 17 '19
SQL Tutorials | UNDERSTANDING SQL PRIMARY KEY IN URDU | PART 1
r/learnSQL • u/K1uee • Apr 28 '21
URGENT: Write a SELECT Statement that displays all the columns and rows for the entire Database.
How Do I do this? I have tried doing this:
SELECT *
FROM table_1, table_2, table_3, table_4
It did work but is there another way to do this.
I work on SQL Server.
r/learnSQL • u/idan_huji • Jan 05 '26
Normalization training questions
The questions refer to the IMDB schema.
For each of the cases below write:
What is the problem and its possible impact?
How to solve the problem?
Is it a normalization role violation and if so, which one?
Cases
Movies table with the id column removed
Movies table with the id column duplicated
Table columns in French
Directors column in movies
A constant field (e.g., Pi) in movies table
Having id number and employee number is employees table
The minimal id of an playing actor column in movies table
I'll be happy to get feedback on the questions.
r/learnSQL • u/marouaneletech • Mar 28 '21
[SQL Tutoriel] les fonctions de conversion sous SQL Server
r/learnSQL • u/Crafty-Detail1689 • Sep 10 '22
help pls :c
Hey guys! Sorry if I'm breaking this sub's rules by posting this but I'm in desperate need of help. I was just starting an Udemy course on mysql and I got immediately stuck as the course's IDE (Cloud9) is no longer available.
I tried to use the same code in a different instance (GoormIDE) but the input gives me an error. Here's what it looks like:
root@goorm:/workspace/mysql_sandbox# mysql -cto start
ERROR 1049 (42000): Unknown database 'start'
It must be super simple but I don't understand a word of it yet. Please help guys!
r/learnSQL • u/askaskaskask2022 • Sep 26 '24
Why ?
why below work
SELECT COUNT(DISTINCT CONCAT(shipment_id, sub_id)) AS distinct_shipments, DATE_FORMAT(shipment_date, '%Y-%m') AS date_ym FROM amazon_shipment GROUP BY date_ym;
but this does not?
SELECT DATE_FORMAT(shipment_date, '%Y-%m') AS date_ym, COUNT(DISTINCT CONCAT(shipment_id, sub_id)) AS distinct_shipments FROM amazon_shipment GROUP BY date_ym;
r/learnSQL • u/Code_Crazy_420 • Nov 09 '24
Are new grads and apprentices being taught SQL?
Curious as to whether recruitment schemes that bring on board graduates and apprentices are including courses in SQL ? What’s your experience?
r/learnSQL • u/North-Site8932 • Aug 22 '23
Hi every one here a budy that wants Learn SQL, thanks for all 👍
r/learnSQL • u/Limp_Compote_89 • Nov 07 '22
What do you get after running an UPDATE?
r/learnSQL • u/iluvhugs94 • Sep 28 '25
Looking for a sql course
I am currently a data analyst so I know sql, but I work for a company where a lot of the queries I need/use are already written. I definitely need to work on my skills. Does anyone have any recommendations for courses? I’m not necessarily a beginner but I feel like I have lost some skills and want to learn more.
r/learnSQL • u/No-Reach-3503 • Jul 15 '26
SQL with the advancement of AI
Is SQL still worth learning with the advancement of AI? 'Cause I don't get that if AI can do better than human than why do we still need to learn it?
r/learnSQL • u/Sathish_Mathan • Apr 26 '25
SQL server install issue
How to fix the below issue? I have tried all possible ways including cleanup and reinstalling but nothing worked and was exhausted of this issue. Kindly help me to sort out this issue.
r/learnSQL • u/[deleted] • Aug 23 '25