Chapter 7

Introduction to SQL

This tutorial is based on the Library Carpentry SQL tutorial, licensed under CC-BY 4.0.

Attribution

Jordan Perdersen (Ed.), Kristin Lee (Ed.), Christopher Erdmann (Ed.), Lise Doucette (Ed.), Elaine Wong (Ed.), Janice Chan (Ed.), James Baker, Fernando Rios, Tim Dennis, Belinda Weaver, … orobecca. (2019, July). LibraryCarpentry/lc-sql: Library Carpentry: Introduction to SQL, June 2019 (Version v2019.06.1). Zenodo. http://doi.org/10.5281/zenodo.3266102

DOI DOI

Modifications

Extracts modified to Jupyter notebook use by Stian Soiland-Reyes https://orcid.org/0000-0001-9842-9718.

Sections

  1. Introduction to SQL
  2. Selecting and sorting data
  3. Filtering
  4. Ordering and commenting
  5. Aggregating and calculating values
  6. Joins and aliases
  7. Saving queries
  8. Database design
  9. Creating tables and modifying data
  10. Other database tools
  11. Extra challenges (optional)
  12. Bonus: Good Style