Overview

Structured Query Language (SQL) is a programming language for interacting with relational databases. This workshop covers basic SQL keywords to view, filter, aggregate, and combine tables in a database. SQL is supported by many different database systems. The examples in this workshop use a SQLite database, but most of the keywords are applicable to other database systems as well. The workshop also covers how to use SQLiteStudio, an integrated development environment for SQL code.

We’ll focus on querying data to get to know a database and answer questions, and joining data from separate tables.

Learning Objectives

After this workshop learners should be able to:

  • Describe the advantages and disadvantages of using SQL for data problems.
  • Use SQL queries to view, filter, aggregate, and combine data.
  • Combine SQL keywords to develop sophisticated queries.
  • Use SQL queries to solve problems with and answer questions about data.
  • Identify additional resources for learning more about SQL (such as how to use SQL with the R programming language).

Prerequisites

No prior programming experience is necessary. Before the workshop, learners should:

  • Install SQLiteStudio and verify that it runs. See the install guide for details.
  • Download the file 2022-04-04_intro-sql.zip from this link. Unzip the file and keep track of where it’s saved on your computer. It contains a data set and a script that will be used during the workshop:
    • lcdb.db
    • intro_to_sql_spring22.sql

GradPathways Microcredential Assessment

If you’re taking this workshop to complete a GradPathways microcredential track, you can download the assessment here.