Articles Cookbook
Back to articles list
- 9 minutes read

How to Practice SQL

Do you already know what SQL aggregation functions are, what JOINs are, and how “group by” is different than“order by”? Great, congratulations. But don't you think that in order to master SQL and be able to apply it, you need to practice? We advise you on how to practice SQL to prepare for a data analyst job interview or to simply boost your knowledge effectively. Because, as they say, SQL practice makes perfect.

LearnSQL.com is our platform for learning SQL, and we want to share with you a few tips on how to practice SQL to become an independent database user.

“Practice is the hardest part of learning, and training is the essence of transformation.”

The Cambridge dictionary defines practice as the act of doing something regularly or repeatedly to improve your skill. The matter is simple. Without practice, you will never become an expert in any field. It is an essential component of developing and expanding your skills.

Practice

SQL is like any other skill. It requires a lot of practice. You must learn practice SQL if you want to be good at it. Imagine you are training at basketball. You can watch all the matches of your favorite team. You can read the biographies of Michael Jordan and Larry Bird, but without going to the court and practicing dribbling, running, and shooting the ball, you will not be a good player. You won't go far without proper knowledge, but you won't go anywhere without practice. So what if, in theory, you know how to play Pick and Roll, but you have not actually tried to apply it in the game? You have to apply it to get better, and it's the same with working with databases and SQL.

Another example? You take a painting class at your university. The teacher tells you about Picasso, Salvador Dali, and how to mix paints properly to get an aquamarine color. But until you stand in front of the easel and paint, you'll never be able to say that you are a painter. Maybe an art expert, but not an artist.

Where to practice SQL?

Tutorials

It all depends on how much you want to learn SQL. You can choose tutorials on Youtube. I tried that too. You can watch videos for hours in which someone writes queries in a notebook and mumbles something under their breath. Later, you can try to rewrite lines of code for your own project, but usually, you will not understand everything. As you can predict, it typically ends poorly, in one big chaos, and instead of learning and getting better in SQL, you just get upset, get a headache, and come to the conclusion that it was one big waste of time.

The second way is to reach for a specialist book. There are many interesting titles on the market. Here are some of the suggestions we've selected that we think are worth reading - 5 Books That Will Grow Your SQL Skills. Most of these books contain sets of exercises. But yet again, you are left to figure it out alone. You need to first create a fabricated database in order to practice a given SQL function on a fabricated problem. Sound interesting? Not really. Try it, but I can't guarantee much success. Without a specific problem and real practice, you'll never get to where you want to be - to be a SQLexpert.

Another way to practice SQL is to enroll in a stationary course or programming school. It's usually a good idea. But you must realize that this type of training is not cheap. Usually it's at least a few hundred dollars. Because it's usually a whole cycle of training or bootcamp, you must first survive many hours of theory to finally start practicing SQL. Most tasks are designed to prepare you for passing the final exam. In my experience, these tasks are mostly useless for starting your own project etc. If you really try, you will gain knowledge and a bit of practice this way, but you still can't be sure that when you start working as an analyst or DBA, for example, that you will manage.

Best way to practice SQL

In my opinion, the best way to practice SQL is by gaining hands-on experience in solving real-world exercises, meaning that you get real-time feedback on your work. Our platform offers such a solution for users who know the basics of SQL. It gives you a ready set of SQL practice exercises, which are logically arranged - from easier ones to more challenging ones. This way, you will be able to practice almost any SQL function and be sure that you can do it well. Most importantly, these are not imaginary exercises. The tasks are based on databases similar to those you might encounter in your later work. They are adapted to the form of the course but, at the same time, give the impression of working on a real project. During the course, you will come across real SQL problems and solutions that you can use in future work.

What's more, our SQL Practice will be helpful not just for those who have learned the theory and want to test it in practice. Are you preparing for a job interview that requires knowledge of SQL? Great - repeat all the functions in these exercises, and check what else you need to work on. There is also something to gain for those already working with SQL, who want to refresh some functions and features, and for those who do not want their SQL skills to rust and want to be up-to-date with market trends.

Chair

Where better to practice SQL if not in a comfortable chair at home, with a cup of coffee and at your own pace? All you need is a computer, a browser, and motivation. If you need help, LearnSQL.com mentors will make suggestions and lead you to the right solution. If you want to talk about your SQL query, the SQL Practice course will give you access to an active student community. You can also talk about it on an interesting, ever-growing Facebook group - We Learn SQL. People from the industry, students, and maybe your future employer gather there. It is worth joining, participating in discussions, and commenting - not only because it’s better to learn something in a group, but also because it’s worth it to build your personal brand in the SQL society.

So let's make a comparison using none other than SQL. Here is a database containing all the options I indicated. I added columns containing features that in my opinion are the most important. They are called the options:

IDSourceI_tried_itCommunityReal_world_examplesSelf_paced
1YoutubeTRUENullNullTRUE
2BookTRUEFALSEFALSETRUE
3SchoolTRUETRUEFALSEFALSE
4Online CourseTRUETRUETRUETRUE
SELECT source 
FROM Options
WHERE I_tried_it is true AND community is true AND real_world_examples is true AND self_paced is true;

RESULT:

IDSourceI_tried_itCommunityReal_world_examplesSelf_paced
4Online CourseTRUETRUETRUETRUE

Real SQL problems and solutions

In the SQL Practice course from LearnSQL.com, you will be learning by doing. This means that you will gain practical knowledge and practice thanks to the real code editor, real data sets, and real-world problem solving.

What can you expect?

  • Exercises for basic SQL clauses (SELECT statements with WHERE and ORDER BY clauses)
  • SQL joins (INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, multiple JOIN, self-JOIN, non-equi JOIN).
  • Aggregation with GROUP BY and HAVING.
  • SQL subqueries (including correlated subqueries).
  • And many other SQL practice exercises

In addition, for your work, you will receive a special certificate that you will be able to show your boss and join to your LinkedIn profile. Perhaps this is the chance to achieve the raise that you've been eyeing for months? Or maybe a future employer will notice you on social media and offer you a good position?

Conclusion

In this article, I described how to practice SQL the right way. If all this seems unrealistic to you, I assure you that it worked in my case. I'm 35 years old. I was a news journalist at a TV station. Constant adrenaline, deadlines, and nerves. I decided to do something for myself and started learning SQL. The ads sounded fantastic - “learn how to work with databases and change your life.” I trusted these simple slogans. As a taskman, I approached it practically. I did courses and boasted about my certificates on the internet. The phone rang after a few days, and I got a job in data analytics. That's how my adventure with SQL began. Quickly I started to learn other languages like Python and R. Well armed with programming skills, I began to conquer the IT world, and, above all, I could work from home and look after my little son. Such stories happen all the time. You still don't believe? Try it yourself. Maybe your life will change for the better.

go to top