>_ IzzyLab

Topic breakdown

SQLite stores the whole database in one file, and sqlite3 runs plain SQL over it. Summing a column across all rows is the job of the aggregate function sum() inside a SELECT; the utility will print the single number to stdout. To put the result in a file, the output is redirected with > — this creates (or overwrites) the destination file with exactly one number.

What's checked

  1. /root/revenue.txt has the correct sum

What it looks like