Hands-on task
This task is step 9 of the course “SQL with SQLite”
SQLite: filtering groups with HAVING
The database /root/shop.db has a table sales(id, category, amount). Find the categories whose total revenue is greater than 300, and write their names (one per line) to /root/out.txt.
Reference:sqlite3
What you'll practise:
- sqlite3
- having
- group by
- group filtering
- aggregates