Hands-on task
This task is step 2 of the course “Databases in an evening: SQLite, PostgreSQL, Redis”
SQLite: how many pages in the catalog
The database /root/library.db has a table books(id, title, pages). Count the total number of pages of all books with a single SQL query and write the resulting number to /root/pages.txt.
What you'll practise:
- sqlite3
- sum
- aggregate functions
- output redirection