Hands-on task
This task is step 4 of the course “SQL with SQLite”
SQLite: top 3 by price (ORDER BY + LIMIT)
The database /root/shop.db has a table products(id, name, price). Output the 3 most expensive products — only their names, in descending order of price — and write the result to /root/out.txt (one name per line).
Reference:sqlite3
What you'll practise:
- sqlite3
- order by
- limit
- sorting
- top-n