Hands-on task
This task is step 18 of the course “SQL with SQLite”
SQLite: orders above average (subquery)
The database /root/shop.db has a table orders(id, amount). Find the orders whose amount is greater than the average amount across all orders, and write their id (one per line) to /root/out.txt.
What you'll practise:
- sqlite3
- subquery
- avg
- scalar select
- where