Skip to content

Latest commit

 

History

History
57 lines (30 loc) · 878 Bytes

File metadata and controls

57 lines (30 loc) · 878 Bytes

SQL_outline

high level outline for 3 classes

  1. Intro to data bases and SQLiteStudio
  2. advanced SQL queries in SQLiteStudio
  3. SQLite from the command line, SQL from Python

Intro to data bases, SQLite and SQLiteStudio

  • pre-class reading (high level - databases and SQL)

  • in-class

    • discuss pre-class material

    • install SQLiteStudio (if not already installed)

    • download Rexon_Metals.db

    • tour of UI

    • simple queries and views

      • SELECT

      • FROM

      • WHERE

      • simple calculation on columns in a view

    • saving views and query results

More advanced SQL queries

  • BETWEEN
  • AND, OR, and IN
  • WHERE on text - LIKE and wildcards ( _ and %)
  • WHERE on booleans and the NOT keyword
  • GROUP BY
  • ORDER BY
  • CASE
  • JOIN

Using SQL from within Python

The SQLite3 package / API.