I have a query that produces data like this:
q1-100 represent responses to questions. I am only interested in responses = 2 for consecutive years. So I would like to feed the above into a second query to produce this result:
Any ideas how I can achieve this? Thanks for any assistance.
Code:
name date q1 q2 q3 q4 q5
Subject A 3/1/08 1 2 1 2 1
Subject A 5/3/09 1 2 1 1 2
Subject A 6/4/10 2 1 2 2 2
Subject B 4/5/08 1 1 2 1 2
Subject C 2/7/09 1 2 2 2 1
Subject C 3/8/10 1 2 1 2 1
q1-100 represent responses to questions. I am only interested in responses = 2 for consecutive years. So I would like to feed the above into a second query to produce this result:
Code:
name date q1 q2 q3 q4 q5
Subject A 3/1/08 2
Subject A 5/3/09 2 2
Subject A 6/4/10 2
Subject B 4/5/08
Subject C 2/7/09 2 2
Subject C 3/8/10 2 2
Any ideas how I can achieve this? Thanks for any assistance.