5
SELECT funcionario_id, data, avaliacao_postura FROM equipe
id funcionario_id data avaliacao_postura
1 1 2014-03-02 -25;-10;-5;-12
2 1 2014-03-01 -25;-10;-18
3 1 2014-03-02 -25;-15;-14
I need to make a select that returns the sum of the field avaliacao_postura
doing the sum on all equal and negative dates and the result grouped by date. The result would have to be like in this example:
funcionario_id data avaliacao_postura
1 2014-03-02 -106
1 2014-03-01 -53
It would be quite simple, were it not for the need to add values horizontally within
avaliacao_postura
, which is text and not numerical.– bfavaretto