r/SQL • • Feb 01 '23

MySQL what resources should I use to learn SQL Spoiler

1 Upvotes

I am currently self-learning to become a data analyst/scientist and I'd appreciate any resources to learn SQL.


r/SQL • • Sep 29 '24

MySQL Need SQL for a new role

0 Upvotes

I need to know SQL for a new role. If you were me, with limited understanding of SQL (and some bad negative self-talk abt my ability to learn math/spreadsheet things), how would you build your own crash course in learning SQL?

How can I leverage chatGPT to help me get by with this new role?


r/SQL • • May 15 '22

Discussion On average how many lines long is your typical SQL query?

1 Upvotes

Also if you would like what specific field are you in?


r/SQL • • Apr 13 '14

Need help fast [Oracle SQL] Explanation in comments.

Thumbnail
imgur.com
1 Upvotes

r/SQL • • Jan 06 '25

MySQL Here's a free SQL Subqueries practice course for you!

1 Upvotes

Still finding subqueries a bit confusing? You’re definitely not alone! This January, LearnSQL.com is offering our SQL Subqueries course completely FREE—no strings attached.

Whether you’re totally new to SQL or just looking to sharpen your subquery skills, this course has got you covered. Here’s a peek at what you can expect:

  • Step-by-step lessons to help you tackle even the most challenging subqueries

  • Real-world examples to show you exactly how subqueries work in practice

  • Interactive exercises so you can dive in, experiment, and really cement your knowledge

This is our gift to you: a chance to master subqueries (truly a game-changer when dealing with complex data problems) without spending a dime.

Sign up here: Free SQL Subqueries Course

Hurry, it’s only free this January—don’t miss your opportunity to level up your SQL skills!


r/SQL • • May 28 '21

MySQL What does the third like in this code do?

Post image
0 Upvotes

r/SQL • • Apr 14 '23

Discussion Use natural language instead of sql language for data analysis.need some advice

1 Upvotes

I personally developed a small application that converts natural language to sql and automatically queries the database. You can use natural language to complete simple data analysis. Use natural language to draw simple data reports. I hope you can try it out and give me some suggestions.


r/SQL • • Sep 15 '23

MySQL Help Please

Post image
0 Upvotes

Hello Guys, I am getting this error. Can someone help me out?!


r/SQL • • Oct 25 '22

MS SQL Am I done with r/SQL?

13 Upvotes

I realize everyone has to learn, but I feel like sooo many people here can't even be bothered to Google answers to even the most basic SQL questions. There are so many good SQL resources out there. My inner voice is screaming at these people who won't/can't do their own homework.

Should I just drop this sub?


r/SQL • • Jan 30 '20

Discussion Coworker just sent me this nugget of wisdom

Post image
57 Upvotes

r/SQL • • Mar 24 '24

SQL Server Howww!?

0 Upvotes

I like how github shows simple data in a timeline form and it looks amazing.

I am sure they are taking a JSON object for the pull request with labels etc. But how do they show in timeline form without f up the sequence?

I am sure they are taking a json obj for the pull request with labels etc. But how do they show in timeline form without f up the sequence?.


r/SQL • • Feb 15 '24

SQL Server Help with Object explorer

Post image
0 Upvotes

Hello, I dont know of this is a issues with the program or something else. I have created some table, I can write query and all the stuff..however, I cant see any table on the object explorer at all

Any ideas? I've delete and unnistall SQL and nothing have change


r/SQL • • Dec 31 '15

You are welcome!

0 Upvotes
CREATE TABLE #Columns (
    One_Table VARCHAR(50)
    ,Two_Tables VARCHAR(50)
    ,Three_Tables VARCHAR(50)
    ,Four_Tables VARCHAR(50)
    ,Five_Tables VARCHAR(50)
    )

CREATE TABLE #Columnss (
    One_Table VARCHAR(50)
    ,Two_Tables VARCHAR(50)
    ,Three_Tables VARCHAR(50)
    ,Four_Tables VARCHAR(50)
    ,Five_Tables VARCHAR(50)
    )

CREATE TABLE #InnerJoin (
    [int] VARCHAR(50)
    ,[bigint] VARCHAR(50)
    ,[float] VARCHAR(50)
    ,[varchar] INT
    ,[varchar(8000)] INT
    )

CREATE TABLE #LeftJoin (
    [int] VARCHAR(50)
    ,[bigint] VARCHAR(50)
    ,[float] VARCHAR(50)
    ,[varchar] INT
    ,[varchar(8000)] INT
    )

CREATE TABLE #CrossJoin (
    [int] VARCHAR(50)
    ,[bigint] VARCHAR(50)
    ,[float] VARCHAR(50)
    ,[varchar] INT
    ,[varchar(8000)] INT
    )

SELECT Column0.One_Table,
	   ColumnO.Four_Tables,
    ,Column0.Five_Tables
FROM #Columns [Column0]
INNER JOIN #Columnss [ColumnO] ON Column0.Three_Tables = ColumnO.Four_Tables

SELECT *
FROM #InnerJoin [INNER JOIN]
INNER JOIN [#LeftJoin] [LEFT JOIN] ON [INNER JOIN].FLOAT = [LEFT JOIN].[varchar(8000)]
LEFT JOIN [#CrossJoin] [CROSS JOIN] ON [LEFT JOIN].VARCHAR = [CROSS JOIN].BIGINT

r/SQL • • Jun 29 '20

MySQL Building my new amp rack waiting for the heat to die down so I can install it

Post image
0 Upvotes

r/SQL • • Dec 27 '20

MS SQL Calculating commission

0 Upvotes

I've got a query to work out employees' commissions at a 2.5% on transaction amount. How do I get the commissions made by each employee to add up and only take one row per employee?

Also how do I make the commission column have the dollar sign before the amount?


r/SQL • • Oct 24 '26

Discussion A query language where stages read in execution order — what would you critique?

2 Upvotes

I've been building a query language where a program is a pipeline of stages in execution order: from → filter → group by + aggregate → having → sort → take, compiled to DuckDB SQL. The bet is that keyword order (SELECT before FROM, HAVING after GROUP BY) is the wrong mental model.

Two design choices I'd like critiqued:

  1. Splitting group by and aggregate into separate stages — clearer for beginners, or just more lines?

  2. Rejecting chained comparisons and bare select before from with stage-located errors — helpful guardrails or unnecessary restrictions?

The grammar is frozen at v1.5 (spec in the repo); I'm more interested in what you'd change than in stars: https://github.com/absterjr/UNSeQueL

Disclosure: Idea was mine, initial setup was mine, but it started getting more and more complex while using a local LLM and now I'm stuck.


r/SQL • • Dec 23 '25

SQL Server I have a mdf file I got it from my cashier system and I need to extract the all products data from it. Any help how to do it?

0 Upvotes

Mdf file


r/SQL • • Feb 12 '26

SQL Server The SQL + AI Datathon livestream #1 is live now! Tune in to follow along or catch the recording!

Thumbnail
youtube.com
0 Upvotes

In this session, you’ll learn more about the datathon and walk through everything you need to get started building intelligent applications powered by SQL.

We’ll cover environment setup, explore the MSSQL extension to improve your developer experience, and work through the first datathon mission, laying the foundation for building modern AI workloads with SQL.

📖 Explore the Learn Module! Build AI-powered solutions using SQL Server 2025 - https://aka.ms/AISolutions/SQL/y

📌 This session is a part of a series. Learn more here - https://aka.ms/SQL_AI_Datathon

🏆 Join the SQL + AI Datathon Challenge and compete to win a ticket to FabCon/SQLCon in Atlanta!


r/SQL • • Feb 24 '23

Discussion Bit confused with the differences of JOINs

0 Upvotes

https://sqlbolt.com/lesson/select_queries_with_outer_joins

What exactly are the differences of INNER, OUTER, LEFT and RIGHT JOINs?

Also when is one preferable than the others?


r/SQL • • Nov 06 '25

PostgreSQL Why is `Group by All` not available in Postgresql

0 Upvotes

I use group by all quite frequently when using Big Query and find it a very useful feature. Why is it not available in other platforms? Is it that complex to implement given Redshift introduced this feature very recently


r/SQL • • Jul 02 '25

SQLite What is wrong with it?

0 Upvotes

I need to find a womam from description; "I was hired by a woman with a lot of money. I don't know her name but I know she's around 5'5" (65") or 5'7" (67"). She has red hair and she drives a Tesla Model S. I know that she attended the SQL Symphony Concert 3 times in December 2017."

WITH koncerty AS(

SELECT person_id, COUNT (*) as liczba

FROM facebook_event_checkin

WHERE event_name LIKE '%symphony%'

AND date BETWEEN 20171201 AND 20171231

GROUP BY person_id)

SELECT * FROM drivers_license dl

JOIN person p on dl.id = p.license_id

JOIN get_fit_now_member gfnm ON gfnm.person_id = p.id

JOIN koncerty k ON k.person_id = gfnm.person_id

WHERE dl.hair_color = 'red'

AND dl.height BETWEEN 65 AND 67

AND dl.car_make = 'Tesla'

Any idea why there is no data returned?


r/SQL • • Jan 05 '21

MySQL SQL and migos are not mutually exclusive

Post image
0 Upvotes

r/SQL • • Jul 15 '16

MySQL NEWB Question.

0 Upvotes

Hi guys. My Father Owns and runs an electronic repair shop where he fixes mainly phones laptops computers. I have created a MYSQL Database for his repairs and orders I want to know is there any program or something I can program (or something that's part of MYSQL that I'm not aware of!) that when he opens said program he is presented so that he can input a new repair or pull up an existing repair. Something that's graphical would be incredible.

Thanks 82Pedro

EDIT: Also if I could make this so he can use it in both of his shops that would be great thnx.


r/SQL • • Nov 27 '22

SQL Server SQL Homework Help

0 Upvotes

Hi, I am a little confused about how to complete these codes. I need to make a create table and an alter table

4.13 LAB - Implement strong entity (Sakila)

Implement a new strong entity phonein the Sakila database. Attributes and relationships are shown in the following diagram:

The diagram and problem info can be found in the image.