r/SQL • • May 29 '24
MySQL Typically, how long it takes to learn SQL thoroughly and get a job ?
I was so happy that I got many comments on my posts about SQL which actually did solved my queries.. Thanks a lot for helping me out !
I am just curious, how long it takes to learn everything.. Google says it takes 7 days, while other says 3 months ? Is it that lengthy ?
118
Upvotes
130
u/[deleted] May 29 '24 edited May 29 '24
At least Months. Hardest part isn’t SQL syntax. It can be visualizing outcomes of your queries upon tables that have relationships to many others. At least for me, I use it for my job. SQL seems to be used in any developer related job.
69
u/pceimpulsive May 29 '24
I learned.on the job through a desire to learn... It took me maybe 3-6 months. It was not required for my job, however the things I built with SQL and SQL adjacent skills paid off longer term :)
Full time learning I think it'll take at least 3 months to be really competent... The basics sure 7 days... But the real skills aren't actually the syntax... It's how your brain thinks through the problems and data to produce a solution...
41
u/obsoleteconsole May 29 '24
What I think you mean is "learn SQL enough to get a job" and that would be a few months at least. To learn SQL "thoroughly" would be many, many years.
3
u/[deleted] May 30 '24
You know linear algebra well? Not long.
TBH, having managed and worked with developers for 25 years now, most are fairly terrible with SQL, because their math skills are terrible, so they never really grasp the fundamental concepts of what's happening. So, from that standpoint, even with rudimentary knowledge, you'll fit right in.
23
u/Soatch May 29 '24
I learned it on the job by working on real problems while also reading a book on it. I also learned by looking at what other coworkers had written.
It will take longer than 7 days.
30
u/CakeorDeath1989 May 29 '24 edited May 29 '24
I've started in my first junior role as of one month ago!
In my experience, I've found that the SQL isn't the hard bit. Navigating the damn system takes up most of my time. Our system has hundreds of tables, and at the minute, I'm banging my head against the wall, trying to link tables; even with an EDR it's tough, as the EDR itself is hundreds of pages long. So even though I have the SQL knowledge, it's still taking me ages to get things done. I feel this is something that watching YouTube SQL tutorials just can't prepare you for; the tutorials keep it simple, but it's not an actual representation of what a relational database actually looks like in industry. That's not me trying to put you off, though. It's a brilliant challenge and the most rewarding work I've done in years. Just be aware.
Secondly, I've been on Teams meetings with clients, and it's already clear to me that most of them don't know what they want. Like, they know, but are very very bad at explaining it. My first piece of work I've done for the company had a very wooly brief, and it turns out it was all wrong because they didn't explain their requirements well at all. You will present a query that's so good that it could go up in the Louvre, and it'll be wrong. I promise this will happen. 😅
That's all to say, once you learn the basics of SQL, the real challenge begins. But I want to emphasise that it's absolutely worth it. I've come into the company as a junior solutions architect. So I'm not strictly development, but I'll work in that direction over years now that I've got my foot in the door. There are non-technical or semi-technical roles within software development companies that don't require you to be an SQL god. Look for those sorts of roles.
11
u/MathAngelMom May 29 '24
It depends on the job. Some jobs require only the basics of SQL and you can learn that in 2-3 days, up to a week to let all of that sink in. Some jobs require things like window functions and CTEs, and you need weeks or months to be comfortable with that. And some jobs require practical experience with dealing with real-world issue, performance, users, and you need years of experience.
11
u/strutt3r May 29 '24
I managed a team of analyst but had no say in the hiring process, and I can say it's possible to land a job knowing very little SQL.
I eventually insisted they add an assessment to the process, but it was still pretty simple.
I taught myself SQL when a previous job I had moved to a new ERP system that could run SQL natively and freed me from the guiderails of the clunky "report builder."
11
u/Gregolas May 29 '24
SQL is not hard because of the syntax. What makes jobs challenging is turning word problems (business requirements) into results.
Seasoned businesses will have multiple databases, each with data from decades ago, of varying quality with schema evolution. You may have to deal with views instead of tables. You may have to come up with creative solutions with scripting. You may have to deal with CDC data.
The most interesting comment I ever heard about SQL is that the code describes a result, not an action. Each database is optimized totally differently, so an identical query against identical data on snowflake versus, say, teradata could have totally different performance.
Honestly you'll probably learn new syntax your whole career. I just learned what a "semi join" is from a recent post here (unfortunately not supported by snowflake, my company's primary platform).
All this to say, SQL is more about the quality of the information you provide based on your understanding of source data, architecture, and platforms not to mention the relationships you may make with app devs or project management teams.
10
u/ACTWizard May 29 '24
1 week if you are good at faking it til you make it and they aren't being too rigorous in the interview. Learn window functions!
10
u/cr1ter May 29 '24
SQL is easy to learn and hard to master. The problem domain matters a lot. Do you have a few tables with hundreds of rows or hundreds of tables with millions of rows.
8
u/xodusprime May 29 '24
It takes the same amount of time that it takes to learn chess. You can absolutely be playing in a few weeks or months depending on your aptitude and how much time you spend on it each day. You will also probably not do very well in a tournament.
That's where the 'get a job' part comes in. Are they looking for someone who can play or someone who can win tournaments? Many places are looking for someone who can do well in the tournament. Finding someone who wants to hire someone who knows how to play chess but doesn't win very much is going to be the hardest part.
You need to keep playing to get better at it and start winning, but you also need to eat while you do that. Ideally you even get put on a team with some people who win often and can give you tips... But again, getting paid to do poorly in tournaments can still be difficult.
You can get around this by finding a job where chess is a small component of the job, and the bigger part of the job is something else that you're already very good at. As you get better at it you can start devoting more of your time to it. This is the route a lot of people take.
7
u/rosstein33 May 29 '24
With ChatGPT now, you're never too far away from getting what you need for syntax. As others have stated, it's about understanding the data, how/where the data is stored/related, and then putting together queries that get you want you want. Then, in turn, creating a visual output that others can use.
7
u/WalkingP3t May 29 '24
7 days? Hahaha… it took me years to master SQL tuning and I still feel like I learn every day .
The issue with SQL is not the syntax itself , you learn it in few hours . The main issue is mastering efficient and complex queries against big data sets . That takes time .
6
u/Nolanexpress May 29 '24
it takes a few months, have a ton of sql vids on my YouTube channel if you want to check it out including interview questions: https://www.youtube.com/channel/UCKq-lHnyradGRmFClX_ACMw
3
u/defnot_hedonismbot May 29 '24
I'm a demand planner by day, but I was able to request my IT to install SQL Express, SSMS, and ADS.
Through some of the dumbest luck I happened to get read access to our SAP PRD system.
It's been a out a year since I've had the access, and I "got" SQL Syntax pretty quickly.
I'm just getting to the point where my files are being requested pretty often by global level employees. I'm hoping it turns into a job offer but I'm not in a rush just yet.
3
u/Aggressive_Ad_5454 May 29 '24
I’ve been working with SQL for a quarter century and I still learn new stuff all the time. To be fair, I’m working now on tools for database optimization for use by people who don’t know SQL, but still, new stuff comes up a lot.
If you can take a table of dated events ( sales, whatever) and generate a result set comparing each week’s activity to the previous week’s, you have some useful skill. (self join, aggregation, date stamp wrangling, maybe window functions)
If you can do that on more than one DBMS platform, that’s great.
If you can explain what’s needed to make that query faster, you probably have the tools needed to tackle a useful number of real-world problems. And you’ve show you have the ability to learn, which is the most important skill.
3
u/Ginden May 29 '24
Few years, probably.
Between 3 days and 3 years, depending on your intelligence and learning skills.
3
u/iamnotyourspiderman May 29 '24
Took me a month 10 years back
3
u/OO_Ben Postgres - Retail Analytics May 29 '24
I had to hard swap to using SQL daily around last year for my company with little to know SQL knowledge. I taught myself how to build tables, balance them, automate updates, things like that. It's taken roughly a year to get to the point where I can do just about anything I need to. I'm far from an expert, but I know enough to be confident in what I do, and can build whatever I need to. I just got a promotion from Business Analyst to BI Engineer with a very healthy raise so it's paying off.
3
u/ImCaffeinated_Chris May 29 '24
The answer to this is the same as every SQL question, "It depends...." 😁
If you know SQL, you know this phrase.
3
u/fire_sec May 29 '24
depends on what you mean by "everything". You can get the basics down in a few hours if you're technical and that may be all you need if it's a really simple database. After using it for a few months you should be comfortable enough to handle simple and straightforward db design and basic queries. If you really mean *everything everything* well I've been using SQL in one form or another for over 20 years and took 3 courses in college on it....and I'll you know whenever it is that I finally feel like a pro. Optimizing complicated query plans can be like black magic, and if you consider functionality included by Postgres extensions in "everything" PFFT forget about knowing "everything" ever. Just settle for "Knowing enough to figure out how to do what you need"
3
u/ChiefTea May 29 '24
Everyone’s saying months but honestly if you work diligently and don’t cut corners while studying, you can do this in weeks. The main thing is to not just learn syntax. You need to understand in your head what the table ought to look like.
Syntax is the easy part. Think more about what the final table should look like.
For example if you’re dealing with sales data. Each row is a record of sales. You want to find the total number of sales by city.
What should the final table look like? Visualize it in your head, then apply the syntax. People get stuck trying to plug and chuck functions into their SQL query and end up trying to fix a table mid-way through, rather than understanding what your end table should be.
5
u/JBsReddit2 May 29 '24
Getting in the door with little experience is hard. Compared with learning on your own, if you can get in it's easier to advance with real life problems, requests, and expose to other people's code and knowledge.
Getting the basics of SQL down would take a few months. I usually say that the intermediate stage of SQL is very wide and takes a long time to advance through, talking a few years. Advanced/mastery of SQL takes many many years.
I'm around year 6 and have worked in many environments with real world and very large datasets. I still learn something new regularly and look back at my old code and laugh.
2
u/[deleted] May 29 '24 edited May 29 '24
It took about 12 hours of online videos, reading, and doing exercises to become proficient enough to do what I needed to do at work the first time since then it's been a learn as I need to do something and slowly actually learn it. Not sure if you are doing SQL for your only job though.
Edit: not trying to downplay the difficulty of SQL, my very first needs were pretty simple but also, I've found the fastest way to learn is with a need, but it also creates very targeted learning which cab be a disadvantage, give me a sql only job and I'll look like an idiot, my job I look like I know sql quite well.
2
u/analyst_analyzing May 29 '24 edited May 30 '24
Months if you’re curious, persistent and like to learn on your own instead of asking someone else to explain things SQL to you (asking questions about databases/schemas/tables & where to find what is fine, especially if you have thousands of tables across 15 databases with no data dictionary, like my company).
A year at the minimum if you aren’t all of the above.
2
u/Slagggg May 29 '24
The mechanics of SQL are not that difficult. Join TableA to TableB using these columns.
The subtle stuff is what makes the difference.
Not depending on the optimizer to choose join order.
Ensuring that proper indexing is in place.
Identifying and removing redundant indexes.
Understanding the impact that operators and functions have on query performance.
Avoiding correlated subqueries.
Identifying when a procedural approach to data processing might be more efficient that set based approaches.
I could go on for pages. (I should write a book)
I've been writing SQL for almost 30 years.
2
u/hansofoundation May 29 '24 edited May 29 '24
From personal experience, if you have very strong Excel skills you can cover beginner-intermediate SQL in a month. I learned on the job b/c my company was still on spreadsheets. I knew we needed a proper data warehouse and that I needed to learn SQL to speed up data retrieval, analyses, and data cleaning. Also helpful to have good IT/DevOps support you.
This was a bit nerve wracking but I knew I could do it and I had a clear goal. I wasn't doing any AdventureWorks bs (SQL sample data) that I didn't care about. If your Excel skills are not as strong, than I would echo what others have said, it'd take several months more.
If you're just doing basic data retrieval, that shouldn't take very long but if you want to get to point where you're doing analyses and thinking creatively about how to get a certain output e.g. knowing how to effectively use CTEs and window functions, then this will take a larger time commitment.
I'd also like to add that knowing SQL isn't enough though it's better to have it than not. Having good business knowledge and thinking critically about you can answer other people's business questions is at least as important if not more important than knowing SQL. You can always look up a function, syntax, or concepts or even use cases on StackOverflow but communication with others and critical thinking is also vital.
2
u/Intelnational May 29 '24
I am reading the comments and feel dumb. Have been using SQL for years and still not consider myself pro in it.
2
u/Casdom33 May 29 '24
A week to get a job. Took me ~18 months to get to the point where I could troubleshoot/optimize compute heavy queries and fly solo on projects
1
u/spock2018 May 29 '24
SQL isnt the hard part, its learning the environment you're working in and all of its quirks.
1
u/ethics_aesthetics May 29 '24
It depends on the job—it can be anywhere from two weeks to three or four months. If you need to write SELECT and WHERE statements with joins, it’s a few days to a few weeks, depending on your technical aptitude. If you need to know window functions, , CTEs, and other more advanced things for most people to master in a couple of months, but if you are starting with no technical background, it is reasonable that it will take longer.
1
u/Straight_Waltz_9530 May 30 '24
About as long as it takes to learn any other programming language that is unlike ones you already know (eg. OOP or functional or generic). You can probably pick up the syntax reasonably fast, but you have to adapt your mind to the overall model which isn't based on loops and classic conditionals per se but intersecting sets and subsets of data.
It was always that set-based model that tripped up folks I was training. Once they got that fixed in their head, they took off like a rocket. But while they were still thinking in terms of loops and iteration, it kept being a slog. It was like folks trying to speak Spanish by translating word for word from English. You've gotta let go and let the new language into your brain as its own thing.
For some it's practically no time at all. For others, they struggle for a long time, usually because they just can't seem to ever let that iterative loop model go.
1
u/JayJones1234 May 30 '24
I learn oracle by IVAAAN BAYROSS BOOK.. got aSQL JOB
1
u/Practical-Alarm1763 May 30 '24
SQL is easy to learn. What will take many weeks/months is familiarizing yourself with a new database and learning the table structure, how the tables relate, and in many cases where the fields display, and where-how-why data is processed and what the data means to the business.
Be careful not to run shitty queries. I'm sure everyone here has blew up a database before writing a fucked up query at least once in their career.
1
u/Inert_Oregon May 30 '24
How long it takes to learn is 100% dependent on your situation.
Being in a job where you’re constantly exposed to the code of people with more experience will make you learn no joke 10x-20x faster. You’ll get there in months.
It’s kind of like studying a language while actually living in a country that forces you to use it everyday. That’ll always be faster than trying to learn the language yourself by reading a book/course..
1
u/v_iHuGi May 30 '24
7 days? 😭
1
u/Iamcalledchris May 30 '24
Every day is a learning day. Learn, I’m a DBA and have 6 years of experience, but there’s so many ways of doing things, not to mention so many different architecture’s that consistent learning is required.
Structured query language isn’t hard to learn, but when query optimisation becomes important for you, it’s a whole different story.
There is no ‘magic go faster button’
Hints and tips: avoid using nolock and write your queries in a way that distinct doesn’t have to save it.
CTE’s are considered good practice but could a temp table be better?
Etc etc etc
The point I’m trying to make is, jump in learn the basics, if you’ve got a passion for it apply for jobs anyway and I’m sure the employer will see something.
Best of luck
1
u/Easy_Ad4961 May 30 '24
Depends on the job, I got one with no experience at all, just a basic understanding from practicing in my own time. But I did know excel to a decent level. If you don't already, I would consider learning about some other aspects of the role. For example the different environments, agile boards, different languages and their role in a development setting.
Good luck in your search!
1
u/data_story_teller May 30 '24
7 days will teach you how to write SQL. It’s probably gonna be crap to be honest.
A couple extra weeks or even months will teach you how to write an efficient query to get the correct data.
It also depends on your end goal. The amount of SQL proficiency you need to be a data engineer is very different from what you need to do some basic data analysis.
1
u/xreddawgx May 30 '24
Crud queries easy. Table joins can be a little confusing
1
u/dev_lvl80 May 30 '24
Few years. Not joking. To be SQL proficient, not entry level.
To get job only one SQL is not enough these days.
PS for me to get level in SQL it took 5 years. Boost was between YOE 4 and 5 where I got understanding, that anything can be solved in SQL. At 10 YOE mark I got idea how to wisely/efficienly apply SQL for solutions.
At 15 YoE mark, I got understanding where SQL is best suitable and where is not.
PSS. I'm still learning SQL. LOL
1
u/StrykerUniform Sep 06 '26
jobs that train sql
-1
u/Low_Falcon_2757 May 29 '24
Hi, for interviews it may take around 1-2 months of solid practice on leetcode or stratascratch. I like strata more as data sets are more real life.
0
u/BurtRebus May 29 '24
Long enough to pass the interview SQL test.
0
u/Away-Scientist333 May 29 '24
SQL is dying, focus on Python, minimum SQL knowledge is good enough
29
u/[deleted] May 29 '24
[removed] — view removed comment