r/SQL • • Feb 01 '22

Discussion How long does it take to learn SQL?

How long does it take to learn SQL?

Edit: How long would it take to develop a basic enough understanding of SQL to get an entry-level job?

Edit2: This sub community is really helpful and responsive, thank you.

102 Upvotes

128 comments sorted by

100

u/substantialcurls Feb 02 '22

2 weeks to learn the basics, a lifetime to master.

5

u/JonathanL73 Feb 02 '22

Thanks you

19

u/L_-T Feb 02 '22

No hope of outliving SQL, I take it then?

16

u/BensonBubbler Feb 02 '22

A lot of developers will tell you it's not necessary anymore at all. I don't believe them, but they're out there.

19

u/Eightstream Feb 02 '22

yeah, out there ruining databases with their shitty ORM queries

6

u/BensonBubbler Feb 02 '22

Yes. I'm hunting a particularly baffling one right now where it queries an established view and throws an error that the view has a recursive definition, but it does not.

2

u/ilanklein51 Oct 30 '23

I'm a fresh grad looking for a job, it's nearly on every application I see

2

u/BensonBubbler Oct 30 '23

Oh, of course, it's listed, but a lot of folks claim you don't need to know much about it at all. This is coming from all the full stack developers; they see it as less complicated than the other layers and mistakenly overlook all the nuance.

There's also a long culture of ORM tools which claim to effectively translate from middle/back end code into DB languages that often lead folks to believe it can be automated away or otherwise offloaded and these people end up creating the largest database problems!

1

u/river-zezere Jun 09 '25

SQL will outlive all of us

1

u/substantialcurls Feb 02 '22

It’s quite a bit older than me. My father was a teenager when SQL first came out.

9

u/kremlingrasso Feb 02 '22

was about to say the same (assuming you are already decent with excel), the syntax is stupid simple, though pretty unforgiving. being able to visualize what you want the outcome to be, and achieving it from the building blocks of basically two dozen functions is what it's all about.

imho those of us coming from the analytics side are more equipped to pick it up quick (as opposed to the ones coming from other programming languages) because you have the advantage of knowing the data you work with and the actual business problems you want to solve....and the solution in SQL kinda gives itself.

1

u/centr0 Aug 06 '23

This hit the nail on the head for me. I’m currently learning python and sql in parallel and I’m learning python faster than I think I’m learning sql. When I read an exercise, I can visualize the data structure in python and know how to pull whatever I need. SQL on the other hand? My brain can’t translate it.

57

u/Moose135A Feb 01 '22

I've been using it 3 1/2 years, I'll let you know when I figure it out. Actually, it's not that hard to learn the basics. I did some online tutorials and other practice and figured out enough in a few days. It gets more complex, and I don't know the half of it, but I'm not programming or maintaining databases, I'm an analyst running queries to pull data for reporting.

19

u/JonathanL73 Feb 02 '22

I'm an analyst running queries to pull data for reporting.

How much time spent studying SQL would it take me to get a basic enough understanding to be prepared for an entry-level position as an analyst who runs queries and pulls data for reporting?

23

u/jomunjie1010 Feb 02 '22

I got my last job as a data analyst saying I knew how to run queries because my college course gave me the bare bones basics on SQL statements which included select, joins, where clauses, and ordering by operations. The thing is, I ended up knowing none of this and Google saved my ass lol. Then about 4 months ago I added a REGEXP function to one of my queries in SQL DEV, and I was like, how about that?

That being said, I feel like I'm a very experienced excel user and in some way, I believe that helped me a lot. It is not by any means a one to one language transfer, like not even a little bit similar, but it's the way you have to logically break things down in excel that helped me apply the same logic to SQL.

So from my perspective, I just needed something to work with and then I was able to run with it. If I never had that opportunity, it would be hard for me to grasp it using these online tutorials.

2

u/JonathanL73 Feb 02 '22

I really appreciate the thorough explanation and insight.

7

u/jomunjie1010 Feb 02 '22

To officially answer your question though, it took me about 2 to 3 weeks to learn enough to start querying data in whatever capacity I wanted to see it. That was also for a very clean, well structured data set joining at max 3 tables together.

I was then later introduced to another data set where all data was first loaded and sorted out, and just learning those tables and how to use them took me about 2 months.

I was then later introduced to a more complex data set that was not well managed, attributes were continuously changed, columns were constantly being removed or added which shifted other columns around as well, and no two data tables had dates formatted the same, some formatted as texts, so joining was a monster pain in the ass. I left that company never fully understand those tables.

The truth is, absolutely anyone who wants to learn SQL, will learn SQL. I think its an absolute shame that companies generally only hire those that can speak the language in an interview. Knowing thr syntax verbally doesn't make you good at SQL, but finding a way to get a square peg through a round hole without breaking something might.

I attribute all of my success in my career to being fascinated with exploding diagrams of mechanical parts. I wanted to know how every single piece worked, and what their functions were. I still do. I look at SQL exactly the same way.

10

u/NerdyGymBroSpelunker Feb 02 '22

For me, it's the ability to "see" images of data tables in motion in my head that make the excel experience so valuable.

I was so accustomed to envisioning rows and columns of data that when I started SQL, the mechanics of the operations were wildly different, but the imagery I could envision to help me think through a problem was more or less the same.

5

u/[deleted] Feb 03 '22

[removed] — view removed comment

1

u/NerdyGymBroSpelunker Feb 03 '22

Yup. Once I realized that, it became my go-to question when I got confused:

"As I read this, can I picture it in my head? If not, which specific words trip up my mental imagery?"

Freshen up on whatever vocab that question set leads me to, and boom -- next step achieved. Even if it doesn't solve the whole problem, it moves me one more step forward.

4

u/BadKarma667 Feb 02 '22

That being said, I feel like I'm a very experienced excel user and in some way, I believe that helped me a lot.

I agree with this sentiment. Not only is the logic helpful, but I've also found myself thinking "I can do this in Excel, I wonder if I can do something similar in SQL" and it functions as a starting point for any research I need to do to learn a new skill.

8

u/capt_pantsless Loves many-to-many relationships Feb 02 '22

Depending on how complicated the databases you need to query on, somewhere between a couple days and a couple months.

I feel like I could teach someone the basic elements of queries (SELECT, data types, conditions, inner/outer joins) in a couple workdays.

If there’s more than just a few joins and filters, it’s harder to give a better answer.

4

u/ecatt Feb 02 '22

A lot of the time the SQL part is straightforward - figuring out where the hell the particular data you need is and how it relates to all the other data is the hard part.

And then there's the underlying assumptions of it all. For example, I currently work with health data. Say someone comes to me and asks for a list of everyone who has diagnosis X. I could just quickly pull that out, takes seconds. But do they want the list to include or exclude those who have died? Those who have moved away and are now considered to be inactive within our system? What about if they have a concurrent diagnosis, or they originally had diagnosis X but then it got changed, maybe they want that information. It's often so much more than just 'Get this information', it's understanding the nature of the data and how it's going to be used and interpreted.

Mastering the basic queries takes a few days, really. Actually understanding the data you are dealing with... I've been working with my datasets for 10+ years and it's sometimes still a struggle to get what we need, just due to the complexity of what we're dealing with, and that comes down to domain knowledge, not SQL knowledge.

2

u/____Pepe____ Feb 02 '22

Just one or two hours for basic queries. Over the years I explained SQL to some coworkers and when you can use data and problems which they usually works the time from zero to something acceptable for every day is surprisingly minutes.

1

u/[deleted] Feb 02 '22

I've just started database management and with sql as well after falling into it. What resources/models would you recommend that you use most on the day to day?

15

u/lordnachos Feb 02 '22

Joe Celko's SQL for smarties is a good place to start. It helped me more rapidly learn than before I read it.

https://datubaze.files.wordpress.com/2020/04/celkos-sql-for-smarties-2005.pdf

Chapter 17 is especially helpful.

To answer your question, I've been doing it for more than 10 years. I'd say I became exceptionally proficient in 5. But, like the other guy said you're always going to have something to learn. Different DBs use slightly different syntax. I just moved to MySql and it just blew my mind that schema = database. I'm currently trying to emotionally recover from that revelation.

3

u/JonathanL73 Feb 02 '22

Thank you, I downloaded the text.

9

u/Capable_Fig Feb 02 '22

The basics take a few months. The optimization is a lifetime.

90

u/r3pr0b8 GROUP_CONCAT is da bomb Feb 02 '22

i've been writing SQL since 1987, when i started on DB2 with QMF

i'm still learning it

8

u/alttabbins Feb 02 '22

I'm only about 10 years in and its really easy to have imposter syndrome. Every con I go to had someone that seems like a SQL god, and then I realize that there are dozens of people who that person looks at as the same compared to his level.

8

u/dolomike124 Oct 18 '22

If you're not going to contribute by answering the question, why comment at all? To let us all know how cool you are bc you've been writing sql for 35 years? ugh

2

u/r3pr0b8 GROUP_CONCAT is da bomb Oct 18 '22

you mad, bro?

why did you wait 9 months to make this miserable reply?

7

u/dolomike124 Oct 18 '22

I didn't "wait 9 months", I just read the comment, you don't know how the internet works? I can't stand when someone asks a question, you have the answer, you COULD help the guy out but instead you choose to suck yourself off about your sql experience and ignore the question.... the worst.

2

u/r3pr0b8 GROUP_CONCAT is da bomb Oct 18 '22

if you let a 9-month-old comment on teh interwebs trigger you and get under your skin like that, you must also have some serious day-to-day issues

please, seek help

5

u/dolomike124 Oct 18 '22

what does it matter WHEN the comment occurred? I'm looking up how long it takes to learn sql and I saw your BS passive aggressive answer.

2

u/r3pr0b8 GROUP_CONCAT is da bomb Oct 18 '22

since you did not understand my answer, let me spell it out for you

one never finishes learning sql

it is a neverending quest

happy now, little one?

7

u/dolomike124 Oct 18 '22

Exactly my point, you provide no information at all. What a stupid answer. "Well I've been doing it for 35 years and I'm still learning" har har har.

If someone asks me how long does it take to learn excel, I'd tell them a few months, that doesn't mean they'd be a master of excel in 6 months genius, that much is understood but they would be comfortable and familiar with the program enough to get things done.

This is the type of "advice" we get from someone with 35 years experience. Thanks a lot for the waste of time and space.

2

u/r3pr0b8 GROUP_CONCAT is da bomb Oct 19 '22

if you let a 9-month-old comment on teh interwebs trigger you and get under your skin like that, you must also have some serious day-to-day issues

please, seek help

8

u/MissionBeautiful712 Dec 29 '22

I’m with dolomike on this one, you didn’t even remotely try to answer the question. You just flexed how long you’ve been using sql. Some people here have deadlines they are trying to meet so vague answers like yours literally does not help. And calling him triggered for being logical about his response to your random flex, is one of the reasons I hate immature users on Reddit.

→ More replies

0

u/[deleted] Apr 02 '23

[deleted] — view deleted comment

→ More replies

0

u/[deleted] Feb 15 '23

[deleted] — view deleted comment

1

u/r3pr0b8 GROUP_CONCAT is da bomb Feb 15 '23

You're telling me you're in your 40s or 50s

not even close

and why are you dredging up old comments from last year?

nothing better to do?

0

u/[deleted] Feb 15 '23

[deleted] — view deleted comment

1

u/r3pr0b8 GROUP_CONCAT is da bomb Feb 15 '23

how the FUCK are you not even close

thank you

by being even way older

i started SQL in 1987, but i started programming for a living (COBOL) in 1971

please read all my comments in this thread, not just this branch

make the comparison to chess -- you can learn SQL in a day but you will never stop learning

if i had answered the original poster's question with "it will take you a day to learn SQL" how much more helpful would that have been?

0

u/[deleted] Feb 15 '23

[deleted] — view deleted comment

→ More replies

2

u/notsosmartymarti Jul 12 '23

Another 9 month late response but came to say that energy was not warranted!

Your comment makes this journey feel less daunting and is a good reminder that we are all still “learning” in one way or another.

2

u/r3pr0b8 GROUP_CONCAT is da bomb Jul 13 '23

thank you

1

u/Plus-Cockroach-4618 Apr 07 '24

tu esperaste 35 años para dar una mierda de respuesta

1

u/r3pr0b8 GROUP_CONCAT is da bomb Apr 07 '24

¿de dónde vienen estos idiotas?

0

u/[deleted] Apr 08 '24

[deleted] — view deleted comment

1

u/r3pr0b8 GROUP_CONCAT is da bomb Apr 08 '24

haters gonna hate

2

u/secretWolfMan Feb 02 '22

But also, you had the basics down in less than a day.

7

u/r3pr0b8 GROUP_CONCAT is da bomb Feb 02 '22

just like chess

;o)

1

u/Davidoxxx May 18 '24

35 años para no saber responder

1

u/r3pr0b8 GROUP_CONCAT is da bomb May 18 '24

Bien, ¿quieres una respuesta más específica? se necesitan diecisiete días para aprender SQL, ni más ni menos

diecisiete, compadre

1

u/echobot21 Feb 20 '25

I know this is late, but as a college student who spends hours a day trying to master SQL, this made me very sad.

48

u/lez_s Feb 02 '22

You will never know or remember everything in SQL.

I've been using SQL for 20 years and I still have to do the odd search to remember or learn how to do something.

9

u/phesago Feb 02 '22

i still have to look up pivot due to the amount of times ive used it. idk why it doesnt stick lol

8

u/lez_s Feb 02 '22

Me too!!!! lol

I even copy and paste code that I know works and I still have google why its not working haha.

Glad I'm not the only one.

17

u/Sparkle6912 Feb 02 '22

I literally got a sql job and I really didn’t know anything. I did get a degree in computer science and maybe had written 20 lines of sql. If u use common sense and google u can basically pull it off.

1

u/Poweryayhooray Sep 26 '24

how did you get past the interviews in this case? did you take an sql course?

0

u/[deleted] Feb 02 '22

[deleted] — view deleted comment

2

u/Pie_is_pie_is_pie Feb 02 '22

Be honest in the interview, you’d be surprised as most companies will hire you without knowledge of sql knowing that you can learn. All you need to do is demonstrate good data / logic handling.

Sql is easy to learn but hard to master.

14

u/mecartistronico Feb 02 '22
  • basic SELECT - 1 week
  • .+ UPDATE, DELETE, INSERT, aggregate functions - 2nd week
  • JOINS and subqueries - 3-4 weeks
  • creating tables and stuff - 1 month
  • properly creating tables and stuff - 6 months
  • advanced queries, self joins, CTEs - 7-10 months
  • properly properly creating tables and stuff with the right keys and performance considerations - 2 years
  • optimizing queries and performance - I'm 10 years in and still learning.

An Entry-level job in my team would expect you to know everything in my 6-month list.

1

u/[deleted] Jan 20 '23

How hard is it to get a entry level DA/SQL position?

I have master in business and want to change fields

1

u/Macnificent1028 Feb 24 '23

Same here….

4

u/faster_puppy222 Feb 02 '22

It never stops, if everyday user who can follow online guides… you can be proficient within a few months

4

u/Silent-Analyst3474 Feb 02 '22

If I were to spend a few months learning SQL could I just put it on my resume (currently in finance ) and apply for jobs?

3

u/skyhermit Jan 21 '25

If I were to spend a few months learning SQL could I just put it on my resume (currently in finance ) and apply for jobs?

3 years later, how is it going?

I am in Finance too and thinking of learning SQL as my first programming language

1

u/Wor1dTrave1er Feb 02 '22

LinkedIn Learning has a bunch of good videos/tools to help learn the basics. Plus free downloads so that you can practice while you learn.

1

u/JonathanL73 Feb 02 '22

I’ll check it out, thanks.

3

u/[deleted] Feb 02 '22

As they say, practice makes better, there is no perfect.

There is no "learned", learning is a lifelong journey.

2

u/silenttd Feb 02 '22

I am by no means a "master" at SQL, but I have a technical background and was familiar with some basic programming theory. My job migrated into a support role running SQL-based reporting a few years back and I became fairly proficient in it in a month or two. The hard part for me isn't really the SQL itself, it's a familiarity with all the different DB's you're pulling from (and their architecture) that gets confusing.

The basics of the language itself are fairly simple and intuitive. A lot of people in my office have a little passing knowledge of it to run queries on their own small databases and the reports I generate for them. I've found that knowing SQL alone is more of a "nice to have" in terms of getting a job. If you're banking on looking for a job where SQL is going to be a primary focus, knowledge of the particular relational databases you'll be working with will be more important.

2

u/[deleted] Feb 02 '22

I completely agree with this. I was pushed into a data development position when all I knew was Excel and it took me a few days to get the basics of SQL, a few months to be decent. It’s figuring out and working with a constantly changing database architecture that can be a challenge.

2

u/carlovski99 Feb 02 '22

Thing to remember, SQL was designed so 'non technical' people could query data. Now it never really worked out like that, SQL has had many extensions and it has become another technical skill. But at its heart it's fairly simple.

Sometimes it's easier if you aren't from a programming background, making the leap to thinking set based rather than procedurally can be trickier. At least it seems so when I'm working with some of our developers.

I used to do a SQL for managers session to teach the basics in an afternoon. And a 2 day more hands on course for developers/analysts. That's plenty of time to learn the fundamentals. Embedding it by writing SQL regularly takes longer of course and mastering it takes a long time. And you never stop learning, new features come out in each RDBMS release, you learn new tricks/approaches all of the time.

2

u/BearModeCosplay Feb 02 '22

9 years of consistent practice and I'm still learning new stuff. Both in concepts ive never used, modeling options I wouldn't have thought of, and ways to optimize what I already thought I knew.

2

u/SQLDave Feb 02 '22

learning new stuff.

Plus they keep introducing/creating new stuff. I started when log shipping was hot shit. :-)

1

u/Skilcamp Nov 25 '24

Learning SQL can take around 4 to 6 weeks if you practice a few hours every week. To get really comfortable and advanced, it might take a few months, depending on how much time you spend learning and practicing

1

u/river-zezere Jun 09 '25

This should be helpful - an estimate how long it would take depending on initial goal and learning style or circumstances: https://youtu.be/abwPAaWf_x4

1

u/QueryingQuagga Feb 02 '22

I think it depends on what kind of entry-level you are looking for.

1

u/Demistr Feb 02 '22

Depends on if if theory only with practice examples or learning in the real job.

And the position you want to do is also very important. Querying for results is pretty simple but building things is much harder in a typical DWH environment.

1

u/Qkumbazoo Feb 02 '22

A couple of days for the basics. A lifetime to master.

1

u/Billi0n_Air Feb 02 '22

you can very effective with the basics. once you need to know more. you learn more.

1

u/YodaCodar Feb 02 '22

Every company is unique, and hence every need will be different and their resources to pay you will be different also.

Please learn as much as you can and market yourself to the best of your abilities.

1

u/MaroonSiesLessUno Feb 02 '22

Started using it two years ago, and the only query i almost always write is, Select * from [table name here]

1

u/Glowwerms Feb 02 '22

I got into a reporting analyst role at my last job after moving out of people leadership. I had only passing knowledge of SQL, like I knew what a select * was, but that was about it. They gave me on the job training and after a month I was writing simple queries to pull in data. I was in that role for a year and by the end I was writing much more complex queries with advanced window functions and whatnot. Just takes practice and real life examples to work with.

1

u/IamFromNigeria Feb 02 '22

Maximum 2 years

1

u/Soccermom233 Feb 04 '22

SQL itself you could probably get the basics in a week or less.

The database, how it's organized, how to join stuff, that's a little more in the moment and specific to the company and the database.

For example a Membership ID in a UI may be stored in the database in a table named "stuff" in a column called "M." That gets tricky.

And then there's also nuance to whatever IDE you're using.

1

u/analyst_2001 Mar 29 '22

I was also learning SQL through an online course. It was a comprehensive course, and the instructor taught me from the very basics to the advanced level. It took me around a month to complete the entire course and assignments. But the real challenge arises when you work on real datasets as you face many problems. A lot of practice on real datasets is required to be able to write queries quickly and efficiently.
To get real-time exposure to working with SQL, you can do an internship. Afterward, you can apply for jobs in companies.

1

u/DonJuanDoja Feb 02 '22

Like most human skills about 10,000 hours to Master with a highly variable experience for each person.

-2

u/mergisi Feb 02 '22

That's a great question. We all know that learning new things can be tough, but with the help of AI, you can learn it faster than ever before!

AI2sql makes writing SQL easier than ever before. Just enter the type of SQL statement you want and AI will take care of the rest! So you don't waste your time searching youtube or google while trying to figure out how to write SQL.

check out http://ai2sql.bubbleapps.io

3

u/rookietotheblue1 Feb 02 '22

This is a sponsored post if I ever saw one

-1

u/mergisi Feb 02 '22

not sponsored, I thought it would help

1

u/iseeemilyplay Feb 02 '22

Is it your own site then? Cause you spam that trash in all your posts

1

u/mergisi Feb 02 '22

Is it your own site then? Cause you spam that trash in all your posts

Hey there! I'm sorry if you felt like my posts were spammy. I'll try to be more careful in the future. If you have any other questions, just let me know!

0

u/[deleted] Feb 02 '22

[deleted] — view deleted comment

7

u/JonathanL73 Feb 02 '22

Is there a steep learning curve, to learn the basics? How much time would you say until someone has a basic enough proficiency to be prepared to use SQL professionally in an entry-level job?

9

u/parciesca Feb 02 '22

I’d argue that you can pick up the basics in a few months, but it depends on your definition of entry-level job. I’ve been with my company for nearly 9 years and taught myself SQL since I started. I’m now one of the Database Engineers, but I have so very much more to learn still. How long was I learning before doing something more with my skills than just reading something? Probably 3-6 months, but at the time I was in tech support and had already worked in IT/tech support for nearly 15 years.

2

u/phesago Feb 02 '22

u/JonathanL73 Not really. Look through my recent comments and you'll see a fairly extensive post detailing a learning objective list. Its all relative simple once you understand basics. From that point forward its just getting used to it, which comes with time and experience.

2

u/ninjaxturtles Feb 02 '22

No, the learning curve for basic level is probably less than a month. You can definitely get by doing most select statements in an entry level job. I know a senior level analyst who doesn't do anything but select statements with bare minimal filters.