Building data-driven components and applications doesn't have to be so ducking hard

Why you should learn SQL in 2024

2024/01/31

BY
David Neal

Subscribe to MotherDuck Blog

Throughout human history, every advancement or achievement has been driven by our ability to capture, store, and share information. Business, government, education, healthcare, research, agriculture, and every other sector rely on information, or data, for decision-making, growth, and success. The demand for collecting and analyzing data will only continue to grow.

More than ever, organizations collect raw data from internal and external sources. An organization might mine that data to answer questions and gain insight using reporting applications, dashboards, charts, maps, and other tools. However, there’s still much work to be done to get that raw data into those tools, or there may be valuable information those tools can miss.

SQL is an Essential Skill

SQL, which stands for Structured Query Language, is a computer language created for the purpose of manipulating sets of data. SQL can be used to filter, transform, and join data together. SQL is typically used for data sets stored as rows and columns, similar to a spreadsheet. The container that holds and organizes these data sets is called a database.

Since its creation in the 1970s, SQL has become the standard for analyzing data. In Stack Overflow’s 2023 survey, SQL is ranked #3 among languages used by professional programmers.

For every organization that relies on data (arguably every organization), SQL is the indispensable skill they need to get the most value out of their data. Many modern business data tools support SQL, making SQL a valuable skill, even if you aren’t the person responsible for creating and managing databases.

SQL is a Portable Skill

To query or manipulate data with SQL, you write statements using keywords like “SELECT” and “FROM.” This SQL syntax has been standardized by ANSI and is ISO-certified. That means out of the hundreds of databases and data tools available today that support SQL, the core syntax remains the same.

Some databases and tools may extend that syntax with specialized operators, commands, or functions. However, once you learn the basics of SQL, you can leverage that knowledge wherever you go!

SQL is an Accessible Skill

Basic SQL syntax is very readable, almost sentence-like. SQL syntax describes how data should be retrieved or operated upon. Take the following query, for example.

SELECT first_name, last_name, date_of_hire
FROM employees
WHERE date_of_hire > '2018-12-31'
ORDER BY date_of_hire, last_name;

The keywords used in the previous syntax are SELECT, FROM, WHERE, and ORDER BY. These do not have to be capitalized, but many people capitalize them by convention.

  • SELECT specifies which pieces of information, known as columns, to include in the results. In this example, the query asks for the first name, last name, and date each employee was hired. There may be other columns in the same data set, but only these three will be returned in the results.
  • FROM specifies the name of the data source similar to the name of a spreadsheet. It's usually a table in the database but it could be another type of data source.
  • WHERE is used to filter the data. In this example, the WHERE instructs the database to only return the employees who were hired after December 31, 2018.
  • ORDER BY specifies how the results should be sorted. This example instructs the data should be sorted first by the date of hire, and then by the employee’s last name.

Learning SQL is Easier with DuckDB and MotherDuck

The best way to learn SQL is hands-on, experimenting with the syntax and seeing how changes to the syntax affect the results. This means you need access to a database that contains some data to query. Traditionally, corporate databases have been off-limits to casual learners, hosted databases have been too expensive, and most free open-source databases have not been practical to set up and maintain.

DuckDB is a lightweight application for analyzing data with SQL on your local computer. It can read all kinds of data formats so you can start querying data right away.

MotherDuck takes all the goodness of DuckDB, stirs in more features, and lets you run SQL using only your Web browser. As soon as you create and log in to your free MotherDuck account, you can start querying the included sample data. There’s even a built-in SQL syntax checker that will suggest and fix your syntax should you make any mistakes!

Make 2024 the Year You Learn SQL

SQL is an accessible, ubiquitous, and valuable language you can learn in 2024. It’s a marketable skill that practically every organization needs. To start your learning journey, check out the following!

CONTENT
  1. SQL is an Essential Skill
  2. SQL is a Portable Skill
  3. SQL is an Accessible Skill
  4. Learning SQL is Easier with DuckDB and MotherDuck
  5. Make 2024 the Year You Learn SQL

Subscribe to MotherDuck Blog