Weld logo
SQL TUTORIAL • LESSON 1, Introduction

Introduction: Analyzing Data with SQL

This tutorial covers the steps of cleaning and transforming raw data in your data warehouse to get meaningful business insights out of it.

This guide is intended for all people involved in business data analytics — whether you’ll perform the analysis yourself or manage somebody carrying out the analysis, a basic understanding of SQL is an important skill for anyone in the analytics field.

Why should you start learning SQL?

For some, starting to learn a coding language like SQL can seem a bit overwhelming or unnecessary, especially if data analytics isn’t at the core of your work. But taking this step opens up powerful capabilities:

  • Look up all sorts of details in your data.
  • Perform deeper analysis in a few steps.
  • Understand what others have done in SQL before you to speed up how you work with data, and collaborate more efficiently.
  • Support much faster data-driven decisions in your whole organization.
  • And after investing a few hours or an afternoon into learning SQL, you’ll already be able to start working with and analyzing your own data.

An alternative to working in SQL is to stay in Excel or Google Sheets for your data work. Performing analysis in spreadsheets can work for many instances (and sometimes it can still be super beneficial to export your results in SQL back into a spreadsheet for the final analytical steps), but you’ll quickly be limited in terms of the amount of data you can treat in Excel, and it will never be as replicable as with SQL.

Data tooling options (No-Code Tools)

Some tools on the market let you analyze large data sets without writing code - but:

  • They often rely on similar logic as SQL
  • You’ll still need to understand data modeling basics and the correct logic to make it work

With knowing basic SQL it gives you:

  • Clarity on where data comes from and how it’s transformed
  • Confidence and control over you data workflows
  • The ability to audit and trust your results

With a basic SQL understanding and a data platform like Weld, you’ll be able to:

  • Quickly grab the data you need from the tools you use in your business
  • Perform aggregations or analysis that drives value and insights
  • Automatically send your results to dashboards or reverse-ETL them back into the tools you use, like HubSpot or Google Sheets.

This way, you’ll quickly be able to make truly data-driven decisions for your business — or even automate some of these decisions as the data that was once dispersed in the various tools you use will be available across everything you use in your business.

What can you do with SQL?

It’s important to understand that SQL is used in the modeling layer on top of your existing data. As such, you’re not manipulating your raw data in your data warehouse in any way when you write SQL. Instead, you’re modeling how the data is represented for you and will be processed, for example in your dashboard software. You’ll therefore never mess up anything in your raw data by playing around or experimenting with your SQL code.

The data in your data warehouse will typically be a raw dump of data from the various business tools and sources you’ve connected to it. The data is a mess of unorganized tables, and looking directly at this rarely gives you any meaningful insights. The first step to getting value out of this data is to start cleaning up the way this data is represented for the next steps. This is done in SQL, and a basic understanding of how to write commands is enough to get you started.

This step of modeling isn’t just preparation — it’s valuable on its own. Clean, structured data enables you to:

  • Build trust in the numbers
  • Makes your decision-making more confident and data-driven

And once your data is structured, SQL also lets you:

  • Extract new and trustworthy insights compared to looking directly at your raw data.
  • Gain real value when you start performing analysis on your cleaned data.
    • This step will be very familiar to the way you’ve analyzed data in Excel before, but this can be done much faster with more data and replicated with new data seamlessly compared to in spreadsheets.

How do you get started learning SQL?

This tutorial is meant to get you from zero SQL knowledge to performing analysis on your own business data. Step by step, you’ll learn how to:

  • Select and filter data
  • Use aggregate functions to perform more advanced analytics
  • Join multiple tables to get a full view of your data

The key concepts are explained in plain text and for each type of function in SQL, there is a small exercise with sample business data attached for you to try out your learnings. It’s best to go through the exercises along with the articles as it make your SQL work with your own business data in the future much easier.

The Weld Modeling layer is used to demonstrate the lessons.

You can use whatever SQL editor you prefer, but if you’d like to follow the steps in the articles, it’s best to sign up free for Weld.

Next up

Connecting data, tables, and creating a model

Go to lesson