Learn SQLite by working with a real file
Start with four fictional customers and six orders. Follow each lesson, run the query, and compare your result with the answer on the page.
You need Petti on an Apple silicon Mac running macOS 14 or later. Install and open Petti first. The query lessons are free; importing and changing data require an editing license.
Choose a learning path
- New to SQL? Start with your first query, then joins, then a monthly report.
- Working with a file from another app? Try JSON inspection and the before-and-after comparison.
- Starting with a spreadsheet? Follow the CSV import exercise with its separate sample file.
The database is ordinary SQLite. You can inspect the same file using another SQLite client. Amounts are integer US cents, dates are ISO calendar dates, and every record is fictional. These are small learning examples, not performance benchmarks.
1. Read and understand the data
Run your first SQLite query on Mac
Use a downloadable SQLite database to filter paid orders, sort amounts and check exact results. A beginner SQL tutorial in Petti’s free read-only mode.
12 minutes · Free read-only modeJoin two SQLite tables and find missing matches
Learn SQLite INNER JOIN and LEFT JOIN with customers and orders. Run working examples, verify six joined rows, and find the customer who has no orders.
12 minutes · Free read-only modeBuild a monthly report from SQLite data
Group SQLite orders by month with COUNT and SUM, validate totals against sample data, and understand date formats, refunds and integer money values.
2. Work with real-world tasks
Import CSV into SQLite on Mac and verify the result
Import a sample CSV into a new SQLite table in Petti. Check headers, row counts and leading-zero postal codes before exporting the records again.
15 minutes · Comparison is free; editing the practice row requires a licenseCompare SQLite before and after an app action
Use Petti snapshots and What Changed? to inspect a SQLite change. Practice with one order update and understand baselines, partial comparisons and recovery.
10 minutes · Free read-only modeInspect JSON stored in a SQLite column
Preview JSON in a SQLite cell, extract a field with json_extract, and check invalid or missing values using a small downloadable database in Petti.
Updated