Skip to main content
Free course

Introduction to SQL

Master the basics of querying tables in relational databases such as MySQL, SQL Server, and PostgreSQL.

Start Free Course
4 Hours1 Video41 Exercises1,199,090 Learners
3450 XP

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies


Course Description

The role of a data scientist is to turn raw data into actionable insights. Much of the world's raw data—from electronic medical records to customer transaction histories—lives in organized collections of tables called relational databases. To be an effective data scientist, you must know how to wrangle and extract data from these databases using a language called SQL . This course teaches syntax in SQL shared by many types of databases, such as PostgreSQL, MySQL, SQL Server, and Oracle. This course teaches you everything you need to know to begin working with databases today!

  1. 1

    Selecting columns

    Free

    This chapter provides a brief introduction to working with relational databases. You'll learn about their structure, how to talk about them using database lingo, and how to begin an analysis using simple SQL commands to select and summarize columns from database tables.

    Play Chapter Now
    Welcome to the course!
    50 xp
    Onboarding | Tables
    50 xp
    Onboarding | Query Result
    50 xp
    Onboarding | Errors
    100 xp
    Onboarding | Multi-step Exercises
    100 xp
    Beginning your SQL journey
    50 xp
    SELECTing single columns
    100 xp
    SELECTing multiple columns
    100 xp
    SELECT DISTINCT
    100 xp
    Learning to COUNT
    50 xp
    Practice with COUNT
    100 xp
  2. 2

    Filtering rows

    Free

    This chapter builds on the first by teaching you how to filter tables for rows satisfying some criteria of interest. You'll learn how to use basic comparison operators, combine multiple criteria, match patterns in text, and much more.

    Play Chapter Now
  3. 3

    Aggregate Functions

    Free

    This chapter teaches you how to use aggregate functions to summarize data and gain useful insights. You'll also learn about arithmetic in SQL and how to use aliases to make your results more readable.

    Play Chapter Now

In the following tracks

Data Analyst Data Analyst SQL Fundamentals

Collaborators

Filip SchouwenaarsColin Ricardo
Nick Carchedi Headshot

Nick Carchedi

Product Manager at DataCamp

Nick is a Product Manager at DataCamp. Prior to joining DataCamp, he earned his master's degree at Johns Hopkins Biostatistics and worked as a data scientist for McKinsey. Nick's passion for teaching data science began in graduate school, where he was heavily involved in tutoring fellow students, developing the Johns Hopkins Data Science Specialization, and building the swirl R package.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA