Mastering SQL in Just Two Weeks: My Path to Proficiency
Written on
So, you’re eager to learn SQL?
In this article, I’ll share my experience of mastering SQL in just two weeks, which played a pivotal role in landing my first entry-level position in data science.
Let’s dive in!
My Background
At the time I began learning SQL, I was in my final year of a master's program in Physics, and I had already started my journey toward becoming a data scientist. I had a few years of experience coding in Fortran from my early university days and had just completed a Python course, which involved tackling various coding challenges.
> For more on my coding journey in Fortran and Python, check out my earlier articles!
I mention this because I recognize that I entered the SQL learning phase with certain advantages that others might lack. My background in physics, previous coding knowledge, and familiarity with learning technical subjects all contributed to my ability to pick up SQL more swiftly than most.
That said, SQL is a programming language (despite some debates about its classification) that many can learn relatively quickly, especially when compared to more complex languages like Python or JavaScript.
> For context, it took me about two to three months to feel proficient in Python, and even then, I was just scratching the surface.
SQL is quite intuitive, resembling English, and is relatively concise, especially for the fundamental skills needed for entry-level data science positions.
> This brevity is largely due to SQL being domain-specific, designed specifically for data retrieval and manipulation, unlike general-purpose languages like Python, which can be used for various applications, including machine learning and web development.
While some might disagree, I believe SQL is more akin to Excel than to low-level programming languages such as C, C++, or Rust. The takeaway is that SQL is generally easier to learn than many other languages, even for those without a technical or STEM background.
While it’s not feasible to master SQL in a couple of weeks, it is possible to reach a proficient level that enables you to handle entry-level data science interviews and perform well in your job, which is exactly what I accomplished!
Now, let’s explore how I went about learning SQL and the courses I undertook!
If you're interested, you can read about my entire journey to becoming a data scientist below:
How I Became A Data Scientist — No CS Degree, No Bootcamp
#### From Coding Aversion to Data Scientist
[Read more](https://towardsdatascience.com)
My Learning Path
#### Initial Courses
I kicked off my SQL learning journey with free courses from W3Schools and TutorialsPoint.
These courses are excellent, providing a comprehensive overview of essential functions and syntax required for SQL proficiency. I made sure to complete every exercise, which is crucial for cementing your understanding. I highly recommend doing the same to ensure you grasp all the concepts thoroughly.
Additionally, I frequently used Google to find further explanations and articles, supplementing my learning from the courses. It took me a couple of days to complete each course, as I dedicated considerable time to them, though I understand that others may not have that luxury.
In retrospect, completing both courses wasn't necessary; one would suffice to learn the essential syntax and functions. You could likely cover most of the material over a weekend if you aren’t too busy.
The key is to take your time with the content. Don't rush; focus on understanding, as this will enable you to progress more quickly in the future.
> For your reference, these courses cover general syntax for various SQL flavors, including MySQL, SQL Server, MS Access, Oracle, Sybase, Informix, and Postgres. Most SQL syntax is universal, though certain functions may not be present in all variants.
#### Second Course
Following those initial courses, I enrolled in The Complete SQL Bootcamp: Go from Zero to Hero by Jose Portilla on Udemy, a paid course currently priced at £60.
> Keep in mind that Udemy frequently offers discounts, so you may find it at a significantly lower price depending on when you enroll!
I opted for this course because it taught me how to install and run SQL on my local machine, host a database server, and gain insights into the infrastructure surrounding SQL.
The first two courses had only introduced me to SQL syntax in a controlled online environment, missing the broader ecosystem that’s vital for practical use in a job setting. This Udemy course also covered additional SQL functions, reinforcing my understanding from the earlier courses.
Overall, the course spans approximately nine hours, but I progressed through it at a steady pace over several days. If you're particularly efficient, you might complete it in a single day.
However, the emphasis should be on the knowledge and intuition you gain, rather than the speed of completion.
#### Practice
After all that learning, I understood from previous experiences that to excel in any skill, consistent practice is essential. Thus, I moved on to that next step.
As the renowned entrepreneur and investor Naval Ravikant aptly states:
> "It’s not 10,000 hours, it’s 10,000 iterations."
I dedicated a few days to solving SQL problems on HackerRank, a platform filled with various coding challenges across multiple programming languages.
> I also utilized HackerRank to enhance my Python skills!
I chose HackerRank specifically because I had several screening interviews that included SQL questions based on this platform. To improve my chances of success, I practiced extensively here.
I found that the SQL problems closely resembled real-life queries I handle as a data scientist, more so than the equivalent Python challenges available on the site.
Feel free to explore other platforms like LeetCode if you prefer; the main objective is to gain experience in solving problems independently to enhance your proficiency.
In total, I tackled approximately 50 questions before feeling confident in my ability to answer most entry-level data science interview questions. This number may vary for you, but the goal is to practice until you feel comfortable.
And that’s a snapshot of my SQL learning journey. It took me around two weeks to reach a level of proficiency suitable for entry-level data science roles, although I believe I could have achieved it in a week with increased productivity. But, we can't have it all!
Next, I’ll share some advice I wish I had while learning SQL!
Advice
Like any skill, mastering SQL demands consistent effort, time, and practice.
Despite its reputation as an "easier" programming language, some concepts can be complex and require deep thought to fully understand.
> To this day, I still struggle with JOINS, which once led to displaying incorrect results at work!
Here are my top pieces of advice:
- Learn "just enough" to start solving problems. In hindsight, I likely could have taken only one course before diving into coding challenges, which would have accelerated my learning.
- Dedicate extra time to mastering topics like JOINS, Common Table Expressions, and Window Functions. Many find these challenging, but they are incredibly useful in real-world applications.
- Don’t spend excessive time on a problem if you’re stuck. Set a time limit for yourself, and if you can’t find a solution, consider a hint or look up the answer. Just make sure to take the time to understand the solution rather than copying it.
- Don’t rush through the course material. Take your time to digest everything thoroughly; don’t stress about how long it takes. It’s better to go slow now so you can progress faster later.
I want to emphasize once again that mastering any skill in a couple of weeks is nearly impossible. The purpose of this article is to demonstrate how you can become proficient in SQL within a short timeframe, which can help you secure that desired entry-level data science or analyst role.
I hope you found this article helpful!
If you’re looking to become a data scientist, learning Python is equally essential. Check out my previous posts below for insights on how I would approach learning Python from scratch!
How I Learned To Code (No CS Degree, No Bootcamp)
#### A recap of my coding journey and the advice I wish I had
[Read more](https://towardsdatascience.com)
How I Would Learn Python in 2024 (from Zero)
#### My approach to mastering one of the world’s leading programming languages
[Read more](https://towardsdatascience.com)
One Last Thing!
I run a free newsletter, Dishing the Data, where I share weekly tips on becoming a better Data Scientist and insights from my experiences in the field.
Let’s Connect!
- Follow me on LinkedIn, X (Twitter), or Instagram.
- Check out my YouTube Channel for technical tutorials on data science and machine learning concepts!