0
I have a certain column and need to return both the sum of the values of the same, as well as the individual values of each row.
I did a test with UNION and even worked, the first line returned to SOMA and the other individual values of each line. But I don’t know if this is right and if there’s another way to do it. I did so, that’s right?
SELECT SUM(val_resgate) AS resgate FROM ETAPA WHERE fk_servico=39
UNION
SELECT val_resgate FROM ETAPA WHERE fk_servico=39