I have a table of students with a history of classes seen by each one. But I have a serious problem with the code that I use. Can you think of a better way to do the query?