Back to articles list Articles Cookbook
12 minutes read

2020’s Best LearnSQL.com Articles

Table of Contents

We published a whole lot of interesting SQL articles this year. I had a difficult task – choosing the best LearnSQL.com articles of 2020. And here they are.

The crazy year of 2020 is coming to an end. How will we remember it? Probably by the COVID-19 pandemic; we stayed home and fought the virus. It was a difficult time. However, many of us did not give up and kept trying to achieve our professional goals. And that’s why LearnSQL.com kept publishing helpful articles throughout the whole thing.

How Did I pick the Best SQL Articles?

I wondered for a long time about how to choose the best articles from our blog. I tried to arrange them thematically, alphabetically, and by selecting specific topics. However, everything seemed to be wrong. It finally dawned on me. I decided to use an SQL query to pick the articles for me.

Because we analyze various types of site data, this turned out to be easier than I thought. I needed two things - data from Google Analytics about which articles were the most read in 2020 and a list of all the posts (with their authors) that we published this year.

However, I couldn't just take the top 20 from Google Analytics, because some of them were published in 2019 or even earlier. For example, one of our hottest SQL articles is Understanding Numerical Data Types in SQL, which was published back in 2017. So I had to select only those published in 2020 from this list.

I called the table with data from Google Analytics gg and the one with the list of articles a. I know: I should have chosen distinct and meaningful names, but ... as it often happens in memes, black glasses fly towards me and a voice says “Deal with it! 😎

The SQL query below returns the top article from each of our authors. (I did not take into account press releases.) I asked my friend Agnieszka Kozubek-Krycuń, who likes such challenges, and she said that it would be best to use SQL Common Table Expressions and a few SQL JOINs. Here is our SQL query:

with author_visits as (
  select
   a.author,
   a.url, gg.visit
  from a
  join gg on a.url = gg.url
),
max_visits as (
  select
   author,
   max(visit) max_visits
  from author_visits
  group by author
)
select
 av.author,
 av.url, visit
from author_visits av
join max_visits mv
on av.author = mv.author
where av.visit = mv.max_visits
and av.author != 'vertabelo';

The Best SQL Articles on LearnSQL.com

In 2020, 20 authors published their articles on our blog. So, using the above SQL query, I got my Top 20. Here they are, in no particular order.

1.  Advanced SQL Interview Questions with Answers by Tihomir Babic

The fact that this article was so popular shows that many of you are thinking about changing jobs or are preparing for an interview.

In Tihomir's article, you will find SQL questions that frequently appear during SQL job interviews. Tihomir also wrote Common Entry Level SQL Developer Interview Questions; both are useful when preparing for a job change or for career development.

2.  How to Analyze Time Series COVID-19 Data with SQL Window Functions by Marija Ilic

How to Analyze Time Series COVID-19 Data with SQL Window Functions

COVID-19 has dominated this year. Since we're dealing with data, we decided to use SQL to deal with pandemic data.

Huge coronavirus data sets are publicly available and updated daily. In this article, Marija shows how such data can be analyzed using advanced SQL techniques, especially window functions. See what conclusions can be drawn from the data published by Johns Hopkins University. This very current article is full of interesting knowledge.

3.  Are There Any Good SQL Courses For Marketers? by Kate Stolarek

In this article, Kate analyzed SQL language courses for marketers. After all, not only analysts work with databases. As it turns out, SQL is also useful for people in marketing.

Are you analyzing the performance of your marketing campaign? Do you want to know how to decipher trends and changes in customer behavior? Read this article; it’s a fair comparison of different SQL platforms and courses. If you’re a marketer and want to work easier and more efficiently, learn SQL; it pays off.

4.  What Is the Difference Between GROUP BY and PARTITION BY? by Emil Drkusic

Do you want to create advanced SQL reports? You’ll need to use the PARTITION BY and GROUP BY clauses. While they are similar in that both do grouping, there are key differences between them. Emil Drkušić analyzed these differences in detail in this article, which also deals with SQL window functions. If you want to get proficient in window functions – and be able to call yourself a true SQL developer – I recommend our interactive SQL Window Functions course.

5.  TRUNCATE TABLE vs. DELETE vs. DROP TABLE: Removing Tables and Data in SQL by Dorota Wdzięczna

TRUNCATE TABLE vs. DELETE vs. DROP TABLE: Removing Tables and Data in SQL

Sometimes you have to delete a table. Maybe something’s gone wrong and your table no longer resembles what it was at the beginning. But how do you do it? There are a lot of ways to delete data in SQL, including the DELETE, TRUNCATE TABLE, and DROP TABLE commands. Which one should you use? Dorota knows the answer.

In this article, you'll learn the syntax of each command in different database engines like MySQL, PostgreSQL, SQL Server, and Oracle. After reading, you’ll understand the differences between DROP TABLE, DELETE, and TRUNCATE TABLE and when to use each one.

6.  How to Calculate the Difference Between Two Rows in SQL by Ignacio L. Bisso

This is an extremely interesting article that explains two topics: how to calculate the difference between two rows and how to use SQL window functions. You will learn how to work with row, column, and date values.

What I like about this article are the examples and how Ignacio explains everything efficiently. No wonder it was so popular in 2020 – a difficult topic explained in simple and understandable words. Just read and learn!

7.  HAVING vs. WHERE in SQL: What You Should Know by Ignacio L. Bisso

If you work with data, you often have to filter it. The SQL WHERE and HAVING clauses both filter data based on user-defined conditions, but there are big differences in how each clause works.

Martyna excellently explains when to use WHERE and HAVING. Read it and you’ll make fewer mistakes filtering your data. Plus, you’ll find good examples of both SQL clauses.

8.  How to Group Data by Week in SQL Server by Agnieszka Kozubek-Krycuń

How to Group Data by Week in SQL Server

Working with time data in SQL is an interesting topic and a good way to expand your knowledge. Agnieszka discusses grouping data by week, which is very useful for reporting.

There are many interesting examples in this article, which is an extension of the content for the LearnSQL.com course Customer Behavior Analysis in SQL Server. If you are reading this in December, this is our SQL Course of The Month. Check out my conversation with Agnieszka on this topic. And let me just add that this great SQL course is free for everyone throughout December!

9.  How to Join 3 Tables (or More) in SQL by Kamil Bladoszewski

The popularity of this text by my friend Kamil proves that you still don't have enough SQL JOINs. Why limit yourself to just two tables when you can use this function for three, four, or more tables?

If don't know what a junction table is or how to write a join for multiple tables, that’s okay. Just read this article and learn how to do it properly. Kamil gives a lot of examples to help you understand new concepts and start using them right away.

10.  How to LEFT JOIN Multiple Tables in SQL by Kateryna Koidan

Ready for more on SQL JOINs? Here you are. Kateryna's article will show you how to use LEFT JOIN on multiple tables.

But be careful – joining multiple tables in SQL can be tricky. Unlike INNER JOIN, the order of the tables plays an important role in LEFT JOIN, and the results may be completely different if table order changes. If you are inattentive, you may be very surprised to see the final result of your query.

11.  How to Start Writing SQL Reports by Pierre Timms

How to Start Writing SQL Reports

This is a great article about SQL reporting. Pierre summarized all the advantages of such reports and all the necessary steps to learn them.

A well-prepared report, based on a carefully conducted data analysis, can bring huge profits. This will allow you to reduce the time needed to make business decisions and ensure that specific actions will bring the expected results. Is this the scenario you dream about? If so, learn how to create and use SQL reports. Get more out of your data and be more effective.

12.  How to Study Online: 5 Steps to Becoming an Effective Learner by Kamila Ostrowska

Just deciding to learn SQL is not enough – you need to know how to do it effectively. Kamila, while writing this article, gathered the most important tips that will help you become an SQL expert.

How do you find motivation and the learning style that's right for you? What does it mean to use SMART goals for online learning? Find the answers in this great article.

13.  How Will Learning SQL Improve My Daily Work? by Tetyana Skorykh

When someone comes into contact with SQL for the first time, they usually either do not know why it’s useful or they don’t understand what this language is. It often happens that people start learning SQL without a clear idea of how they can use it later.

Tetyana, in a very simple way, explains the advantages of knowing SQL. She uses good examples to help you imagine yourself once you've learned SQL. It's worth reading this article if you want to motivate yourself.

The Most Popular Databases in 2020

Well, we got to my article. I wrote a few in 2020, but it looks like you've read the one about popular databases the most.

In it, I analyzed Stack Overflow research. Thousands of professional developers from all over the world (including database pros) answered questions about their favorite technologies and IT solutions. SQL was at the top, and among databases both SQL and NoSQL solutions were popular: MySQL, PostgreSQL, MS SQL Server, MongoDB, Redis, etc.

I tried to describe all the info in an interesting way. Looking at the number of visits to this post, I think it worked.

15.  SQL in Google Sheets? Yes, We Can! by Adrian Więch

Did you know that you can write SQL-like queries in Google Sheets? You can, thanks to Google Query – a language confusingly similar to SQL. If you use Google Sheets, this is something worth knowing.

The simplicity of the Query language was well described by my colleague Adrian. You don't even have to leave Sheets to work with data - unless you are dealing with large data sets, of course. In that case, good old SQL and relational databases will perform much better.

Adrian not only described Google Query but also gave examples of its practical use. Feel free to copy his queries and use them in your Google Sheet projects. Enjoy!

16.  Listen to These 7 SQL Podcasts by Marcin Koryszewski

Listen to These 7 SQL Podcasts in 2020

Podcasts have been extremely popular for years. They accompany us in our daily activities, when we wait in traffic jams, or as we run in the park. Podcasts are a brilliant way to gain knowledge and broaden your horizons.

Marcin records podcasts himself, so he was the perfect person to review the best SQL podcasts on the market. Can podcasts make databases interesting and accessible? It's really possible - I checked myself. So try the podcasts mentioned in our article. Learn something new while doing your laundry or cooking lasagna. Why not?

17.  The Top 7 Platforms with the Best SQL Courses for 2020 by Zahin Rahman

Many of our users, before they found our SQL courses, wondered which e-learning platform to choose. There are really a lot of learning options out there, and many have interesting things to offer.

Perhaps I am biased, but I will say that in my opinion only LearnSQL.com offers a full learning experience, containing both knowledge and practice. Our courses are simply the best. But to prove this, they had to be compared with the competition. Zaihin did it by taking a closer look at the most popular SQL platforms. See what came out of his analysis.

18.  Top 3 Platforms to Learn SQL Online: A Complete Comparison by Arleta Więch

If there weren't enough comparisons already, see the final clash of the biggest players on the SQL e-learning market: LearnSQL.com, DataCamp, and Codecademy. Arleta provided a great overview of pros and cons for each platform. Find out what you can expect from each of them.

I like that Arleta was really honest in this article. It seems our competitors have nice offers and SQL courses too – which motivates us to improve and give our users an even better experience.

19.  Learning SQL? 12 Ways to Practice SQL Online by Rebecca McKeown

19.	Learning SQL? 12 Ways to Practice SQL Online

Practice makes perfect, especially when it comes to SQL. Rebecca proves this in her article on how to practice SQL, listing 12 methods you can use to progress. Do you want to do an online course? Or maybe you prefer to download a data set on a topic you are interested in and use it to play with SQL? Most importantly, choose the methods that work for you and keep practicing your skills. This is the only way to become an SQL expert.

20.  What Programming Language Should You Learn? by Magdalena Wojtas

The last one on my list is not strictly about SQL; it’s on programming languages in general. Here you will find tips on what you should learn when thinking more seriously about a career in IT. Why is SQL a standard for working with databases and why is Python often the first programming language for future web developers? The answers are in the article.

And there you have it – the top 20 articles that LearnSQL.com published in their blog this year. If you haven’t done so already, read the ones that sound interesting to you. And don’t forget to subscribe to our newsletter and get a notification when we post a new article!