select * from mytable
gives me a result set like:
evaluation | item | criteria | points
1 | 1 | 1 | 111
1 | 1 | 2 | 112
1 | 2 | 1 | 121
1 | 2 | 2 | 122
2 | 1 | 3 | 213
2 | 2 | 3 | 223
2 | 3 | 3 | 233
and I want to end up with a view that puts all criteria used in an evaluation in the same row, for example:
select * from myview where evaluation = 1
would get me
evaluation | item | points_1 | points_2
1 | 1 | 111 | 112
1 | 2 | 111 | 112
and the result set for select * from myview where evaluation = 2
would be:
evaluation | item | points_3
2 | 1 | 213
2 | 2 | 223
2 | 3 | 233
is that possible at all?