Here is a sample of my database :
DATE | OPERATOR
----------------------
2004-08-01 | ope1
2004-08-01 | ope3
2004-08-03 | ope2
2004-08-03 | ope1
2004-08-03 | ope3
2004-08-07 | ope2
2004-08-10 | ope3
("Operator" is an enum of 'ope1', 'ope2', 'ope3')
And I want to obtain something like this :
DATE | ope1 | ope2 | ope3
--------------------------------
2004-08-01 | 1 | 0 | 1
2004-08-03 | 1 | 1 | 1
2004-08-07 | 0 | 1 | 0
2004-08-10 | 0 | 0 | 1
Or more better :
DATE | ope1 | ope2 | ope3
--------------------------------
2004-08-01 | 1 | 0 | 1
2004-08-02 | 0 | 0 | 0
2004-08-03 | 1 | 1 | 1
2004-08-04 | 0 | 0 | 0
2004-08-05 | 0 | 0 | 0
2004-08-06 | 0 | 0 | 0
2004-08-07 | 0 | 1 | 0
2004-08-08 | 0 | 0 | 0
2004-08-09 | 0 | 0 | 0
2004-08-10 | 0 | 0 | 1
(...)
Could somebody help me ?
DATE | OPERATOR
----------------------
2004-08-01 | ope1
2004-08-01 | ope3
2004-08-03 | ope2
2004-08-03 | ope1
2004-08-03 | ope3
2004-08-07 | ope2
2004-08-10 | ope3
("Operator" is an enum of 'ope1', 'ope2', 'ope3')
And I want to obtain something like this :
DATE | ope1 | ope2 | ope3
--------------------------------
2004-08-01 | 1 | 0 | 1
2004-08-03 | 1 | 1 | 1
2004-08-07 | 0 | 1 | 0
2004-08-10 | 0 | 0 | 1
Or more better :
DATE | ope1 | ope2 | ope3
--------------------------------
2004-08-01 | 1 | 0 | 1
2004-08-02 | 0 | 0 | 0
2004-08-03 | 1 | 1 | 1
2004-08-04 | 0 | 0 | 0
2004-08-05 | 0 | 0 | 0
2004-08-06 | 0 | 0 | 0
2004-08-07 | 0 | 1 | 0
2004-08-08 | 0 | 0 | 0
2004-08-09 | 0 | 0 | 0
2004-08-10 | 0 | 0 | 1
(...)
Could somebody help me ?