Database Management
13 May 2026
SQLite has a dot command called .mode that controls the format of the display
If you say help .mode you will get a list of the most common modes. Here are the first few:
<TR> and <TD> tags.First download and unzip the sqliteExamples.zip file and say sqlite3 pets.db
First download and unzip the sqliteExamples.zip file and say sqlite3 chinook.db
select * from invoices limit 5;
select CustomerId,max(Total) from invoices;
select * from customers where CustomerId=6;
select max(i.Total), i.CustomerId, c.FirstName, c.LastName from invoices i join customers c on c.CustomerId = i.CustomerId;
select count(*) from customers;
select min(i.Total), i.CustomerId, c.FirstName, c.LastName from invoices i join customers c on c.CustomerId = i.CustomerId;
select avg(Total) from invoices;
select printf('$%3.2f',avg(Total)) as average from invoices;Although I have a habit of writing sql in lowercase and run-on lines, the tradition is to do it like this
This slideshow was produced using quarto
Fonts are Roboto, Roboto Light, and Victor Mono Nerd Font
