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 management systems. We’ll focus on querying data to get to know a database and answer questions, and joining data from separate tables.

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.

Learning Objectives

After this workshop learners should be able to:

  • Describe the advantages and disadvantages of using SQL with your own data.
  • 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. We recommend learners either attend or review the written materials for DataLab’s Overview of Databases & Data Storage Technologies workshop.

Before the workshop, learners should:

  • Install SQLiteStudio using the install guide and verify that it runs.
  • Download the file 2024-04-09_library-data.sqlite from this link.

NOTE:
If you have a Mac (OSX), you will need to right-click on the SQLiteStudio installer and select open. If you open the installer regularly, the Mac operating system will block the installer from running.

Please see these recommendations for making SQLiteStudio easier to read, particularly for those with low vision and those who use a screen reader.