r/learnSQL • • Mar 10 '26

Do you still need to learn SQL in 2026 if AI can write queries for you?

Thumbnail reddit.com
0 Upvotes

r/learnSQL • • Jan 19 '24

Why is SQL so convoluted? Can someone help me understand this example? For context: the relevant columns in the table are `bike_id`, `duration_minutes`, and `start_station_id`. The objective is to find the most commonly occurring `start_station_id` for the bike with the greatest sum of its minutes.

Post image
1 Upvotes

r/learnSQL • • Aug 01 '25

Learning SQL basics

3 Upvotes

What are the best free or low cost courses to learn basic SQL?


r/learnSQL • • Aug 27 '26

SQL

1 Upvotes

Tell me a website where I can learn and practice SQL to be prepared for an business analyst role


r/learnSQL • • May 07 '25

10 Practical SQL Techniques Every Beginner Should Learn (Helped Me Clean Up My Queries Fast) ⚡📊

10 Upvotes

When I first started writing SQL seriously, it was overwhelming.
🧩 Complex joins
🐌 Slow-running queries
🧼 Messy, inconsistent data
😵 And queries that broke the moment I touched them

After running into these problems over and over, I began collecting techniques that made a huge difference — not just in how I write queries, but how I think through problems.

Here are a few that really helped:
✅ Using CTEs to break down complicated logic
✅ Handling NULLs more cleanly
✅ Writing queries that are easier to debug and maintain
✅ Focusing on structure and readability from the start

I recently pulled all of this into an article — it’s not just a list, but a breakdown of what helped me level up as a beginner:
https://medium.com/@sriram1105.m/10-sql-techniques-that-will-level-up-your-data-analysis-343c5d7dc4cb

Hope it’s useful for anyone who's just getting started — happy to answer any questions or hear what others are learning too! 💬


r/learnSQL • • Oct 20 '22

IYKYK (But I didn't know till now)

2 Upvotes

Something I learned recently from a SQL workshop 🤣


r/learnSQL • • Mar 26 '26

Using ChatGPT to learn SQL

10 Upvotes

Hello all,

I've recently started using ChatGPT to learn SQL. Just posting here the prompt I made and the output it generates in case someone wants to learn SQL like I do.

For context, I am currently learning syntaxes for a SQL certification. As a recent graduate, I understand that SQL is regarded by most as an easy language to learn and that experience is preferred over certifications. However at the moment, I haven't been lucky enough to find a role wherein I can practice SQL so the only way I can showcase that I know it is through projects and certifications, the latter I've chosen to do at the moment.

Anyway, here's the prompt, change it as you see fit:

Using a SQL window, write down a SQL syntax for every function, clause, operator, and statement that I will send after this prompt, the syntaxes should use the following placeholders: 
- For columns: column1, column2, column3 etc. 
- For tables: table1, table2, table3 etc. 
- For numerical datatypes: x,y,z (whenever appropriate and applicable, include a comment beside the placeholder what the x,y, or z numerical placeholders mean)
- For character datatypes: a,b,c etc. (whenever appropriate and applicable, include a comment beside the placeholder what the a,b, or c character placeholders mean)
- For date datatypes: Y’s, M’s, D’s (format as appropriate) 

Include 2 comments before the syntax:
- First comment: identify if the prompt is a statement, function, operator, or clause - Second comment: should be what the output of the syntax is in Leyman’s term, starting it with 'the output of the syntax' 

Within the same SQL window and after each syntax, provide an example of the syntax in use with the context of a publishing company which may include operational and financial metrics. Only include the syntax and not a set of data in rows or columns. Also include a comment that reads out the syntax based on the order of execution, using the syntax and values in the sentence.

Keep note that the syntax should follow the guidelines for Oracle SQL Database.

The output:

-- Statement
-- the output of the syntax is a database object that generates unique sequential numbers automatically

CREATE SEQUENCE sequence1
START WITH x       -- x = starting number of the sequence
INCREMENT BY y     -- y = value to increment each time
MINVALUE z         -- z = minimum value allowed
MAXVALUE x         -- x = maximum value allowed
CACHE y            -- y = number of values to cache in memory
NOCYCLE;

-- Example in use (publishing company context)
CREATE SEQUENCE book_id_seq
START WITH 1000
INCREMENT BY 1
MINVALUE 1000
MAXVALUE 999999
CACHE 20
NOCYCLE;

-- Order of execution comment:
-- Create a sequence named book_id_seq that starts at 1000, increments by 1 each time, has a minimum value of 1000, a maximum value of 999999, caches 20 values in memory, and does not restart when the maximum is reached.

r/learnSQL • • Jul 23 '26

Datacamp

0 Upvotes

I am thinking about investing in datacamp for learning SQL and PowerBi what are your thoughts


r/learnSQL • • Dec 30 '25

how long will it take me learn sql to solve sql 50 question and pass interviews?

1 Upvotes

starting today.

how many days are ideal i need to set deadline for job hunt purpose.


r/learnSQL • • Aug 31 '26

MySQL Second Highest Salary Using Subquery | SQL Interview Query

0 Upvotes

Hello everyone.please checkout my new MySQL video and please hit like, subscribe and share videos in your contacts. https://youtu.be/AhqgtHZfHTI


r/learnSQL • • Aug 14 '24

SQL iceberg

Thumbnail alexandrehtrb.github.io
0 Upvotes

r/learnSQL • • Mar 20 '22

Mastering SQL Query Optimization

Thumbnail
tvkoushik.medium.com
0 Upvotes

r/learnSQL • • Oct 27 '21

Learn the most in demand skill - SQL & MySQL at $9.99 | Udemy

0 Upvotes

Interested in building web applications? Learn the most in demand skill - SQL & MySQL and Up-Skill your career now. Enroll now


r/learnSQL • • Mar 02 '20

Dear creator(s) of Stuctured Query Language

0 Upvotes

I DESPISE YOUR LANGUAGE!!!!!!!

You have gone out of your way -- OUT OF YOUR WAY -- to create a language that is so RETARDEDLY simple you have inadvertently made it INSANELY difficult for logical people to understand and learn the syntax.

Seriously, I've spent all of like, 12 hours working with C# in my life and I feel a helluva lot more confident in that than I do this stupid shiz, and I've been trying to work with SQL off and on for like a year and a half.

(-<)


r/learnSQL • • Jul 17 '19

Hi All, if your enthusiastic about SQL Server, then please sign up to https://sqlserver-tips.com

Thumbnail
sqlserver-tips.com
0 Upvotes

r/learnSQL • • Feb 03 '23

Online class where all lectures are live and recorded and uploaded?

0 Upvotes

r/learnSQL • • Dec 19 '22

How to learn SQL? Starting a job soon where I'll be learning to use it but I want to be prepared as much as possible and supplement what I learn at my job.

0 Upvotes

How to learn SQL? Starting a job soon where I'll be learning to use it but I want to be prepared as much as possible and supplement what I learn at my job.

Ideally I am looking for an answer that's NOT "Google it, or search this subreddit" because I did just that and now I have a shortlist of 27 "single best resource for learning SQL". So that didn't work. Any great sources you'd recommend?


r/learnSQL • • Jun 19 '20

Python will make you a bunch of money if you know it, but if you're doing databases, you are right to make money on SQL. This is why, it should always work the way it does in SQL, this picture demonstrates it.

Post image
5 Upvotes

r/learnSQL • • Jun 15 '25

How LIMIT Works in SQL

0 Upvotes

r/learnSQL • • Sep 20 '25

WHAT ARE SYNTAX DIFFERENCE BETWEEN MYSQL AND SQLITE?

1 Upvotes

r/learnSQL • • Feb 17 '23

can somebody please solve this for me so that i can understand and solve others like this

Post image
3 Upvotes

r/learnSQL • • Jul 13 '25

Pretending I'm a SQL Server DBA—ChatGPT Is My Mentor Until I Land the Job

7 Upvotes

Hey folks,

I just graduated (computer engineering) with little tech industry experience—mainly ESL teaching and an IoT internship. I live in a challenging region with few tech companies and a language barrier, but I’m determined to break into a data role, ideally as an SQL Server DBA. I’m certified in Power BI and I love working with databases—designing schemas, optimizing performance, and writing complex queries.

Since I don’t have a job yet, I decided to “pretend” I’m already a DBA and let ChatGPT guide me like a senior mentor. I asked it to design a scenario-based course that takes someone from junior to “elite” SQL Server DBA. The result was a 6-phase curriculum covering:

  • Health checks, automation & PowerShell scripting

  • Performance tuning using XEvents, Query Store, indexing, etc.

  • High availability & disaster recovery (Always On, log shipping)

  • Security & compliance (TDE, data masking, auditing)

  • Cloud migrations & hybrid architectures (Azure SQL, ASR)

  • Leadership, mentoring, and community engagement

Each phase has real-world scenarios (e.g., slow checkout performance, ransomware recovery, DR failovers) and hands-on labs. There's even a final capstone project simulating a 30TB enterprise mess to fix.

I've just completed Phase 1, Scenario 1—built a containerized SQL Server instance in Docker, used PowerShell and⁣ dbatools to run health checks, restore backups, and establish baselines. It’s tough and pushes me beyond my comfort zone, but I’ve learned more in a few weeks than I did in school.

My Questions:

  1. If I complete Phases 1 to 3 and document them properly, do you think it’s enough to put on my resume or GitHub to land an entry-level DBA role?

  2. Is this kind of self-driven, mentored-by-AI project something that would impress a hiring manager?

  3. Any suggestions on showcasing this journey? (blogs, portfolio sites, LinkedIn, etc.)

  4. What would you add or remove from the curriculum?

Would love feedback from seasoned DBAs or folks who broke into the field unconventionally. Thanks!


r/learnSQL • • 22d ago

Are these 17 SQL commands useful for a beginner aiming to become a data analyst? NSFW

7 Upvotes

Hey everyone! 👋 I’m new to SQL and aiming for a data analyst role.

I saw this list of 17 SQL commands and concepts on YouTube and wanted to ask if they’re actually useful in real-world data analysis.

SELECT, FROM, WHERE, GROUP BY, ORDER BY, LIKE, COUNT, MAX/MIN, AVG, SUM, CASE WHEN, JOIN, DISTINCT, HAVING, WITH (CTE), PARTITION BY, and CONCAT.

For those already working as data analysts, are these enough to build a solid foundation? What would you add or focus on first?

I’d appreciate your advice. Thanks! 🙏


r/learnSQL • • Oct 06 '25

Any best sql course suggestions? Need one rn

0 Upvotes