I have an SQLite database with student names. Each student has different classes. I have a table with student grades and classes and another table that defines class by type. I'd like to run a query (that I'll be saving as a CSV to use in OpenOffice as an Excel document for a mail merge). I need to list the student's Math grade, History grade, Science grade, and English grade. However, some students have more than 1 math, science, English, or history class.
(How) could I create a CASE statement (and possibly a view) that if indeed there is more than one Math class that it can be listed in a view as Math\_Class\_2 for Example?