Hands-on task
SQLite: categorization with CASE
The database /root/school.db has a table students(name TEXT, score INTEGER). Write a query with a CASE expression that translates the numeric score into a letter grade by the rule: score >= 90 → A, score >= 70 (but below 90) → B, otherwise → C. Write the result to /root/grades.txt in the format name|grade.
- case
- conditional expressions
- categorization
- select
- sqlite3