Running SQLite - no argument: in-memory database, will disappear when closed - or new file - or existing file - use .exit or Ctrl-D to get out Getting around SQLite - dot commands - .help - .help to get help on command - .table to list tables, .schema to list table definitions Getting help - .help - SQLite's SQL railroad diagrams on website SQL syntax - SELECT * FROM Species; - case-insensitive, both keywords and table/column names - tab completion - sources of confusion, SQLite keeps prompting: -- when missing trailing ; -- when there's a quoted string and missing trailing ' -- how to abandon? --- get out of quoted string, add &&& for syntax error, then ; --- or Ctrl-C - -- to comment SELECT * - LIMIT, OFFSET - SELECT * from Site - can select individual columns SELECT DISTINCT - SELECT DISTINCT Species FROM Bird_nests; - SELECT DISTINCT Species, Observer FROM Bird_nests; - distinct pairs ^^ ORDER BY - SELECT DISTINCT Species FROM Bird_nests ORDER BY Species; - order is random otherwise, particulary after table updates - as above, order by Species - as above by Species, Date_found DESC In-class challenge - Select distinct locations, are they in order? If not, order them. - Does adding a limit apply after the results are ordered or before? - Refer back to syntax chart - syntax echoes processing order.