Pattern match problem
Date: 09/16/07
(MySQL Communtiy) Keywords: mysql, sql
Hello. I am trying to learn how to solve a complicated (well, for me, I guess :)) ) problem in MySQL. But to do this I first try to figure out, how to solve a simpler problem. May somebody help me? I'll try to formulate it below
Let's say I have a table with student_name, quiz_date and grade (Pass/Fail). (Each student can have more than 1 quiz, not necessary the same number of quizes). I need to create a list of students, whose grades match the following pattern Pass/Fail/Pass in the adjacent(!) dates.
There are 2 main problems for me: 1) How to compare dates. 2) What is the right way to match patterns for a single student.
I would appreciate somebody giving me the decent way to solve this problem. Thank you a lot.
Source: http://community.livejournal.com/mysql/119367.html