Hands-on task
This task is step 5 of the course “Databases in an evening: SQLite, PostgreSQL, Redis”
SQLite: join the tables
In the database /root/shop.db there are tables orders(id, user_id, amount) and users(id, name). Write a query with a JOIN that for each order returns the user's name and the amount, and write the result to /root/report.txt.
Reference:sqlite3
What you'll practise:
- sqlite3
- join
- on
- select
- table aliases