1
I have two columns (valor_unitario
and quantidade
) wanted to make a select that multiplied all columns in the field valor_unitario * quantidade
.
Example:
Valor_Unit|Quantidade
15 * 2
+
10 * 1
Result: 40
1
I have two columns (valor_unitario
and quantidade
) wanted to make a select that multiplied all columns in the field valor_unitario * quantidade
.
Example:
Valor_Unit|Quantidade
15 * 2
+
10 * 1
Result: 40
1
Basically it is only necessary to perform a SUM
upon their multiplication of the columns:
SELECT SUM((Valor_Unit * Quantidade)) AS total
FROM tabela
Browser other questions tagged sql oracle
You are not signed in. Login or sign up in order to post.
Thank you was exactly what I needed
– Felipe Dos Santos