Conteúdo do Curso
SQL Basics
SQL Basics
SUMming values
There is one more function that has to be implemented - function for summing values. For example, we may want to calculate the total revenue for a certain item.
To sum values in column use SUM
function followed by column which values you want to sum. For our abstract example,
SELECT SUM(revenue) FROM sells WHERE item = 'Sofa'
Please note, that
SUM
function works only with numeric columns.
Tarefa
From the audi_cars
table calculate the total tax
for all RS4 cars.
Obrigado pelo seu feedback!
SUMming values
There is one more function that has to be implemented - function for summing values. For example, we may want to calculate the total revenue for a certain item.
To sum values in column use SUM
function followed by column which values you want to sum. For our abstract example,
SELECT SUM(revenue) FROM sells WHERE item = 'Sofa'
Please note, that
SUM
function works only with numeric columns.
Tarefa
From the audi_cars
table calculate the total tax
for all RS4 cars.
Obrigado pelo seu feedback!
SUMming values
There is one more function that has to be implemented - function for summing values. For example, we may want to calculate the total revenue for a certain item.
To sum values in column use SUM
function followed by column which values you want to sum. For our abstract example,
SELECT SUM(revenue) FROM sells WHERE item = 'Sofa'
Please note, that
SUM
function works only with numeric columns.
Tarefa
From the audi_cars
table calculate the total tax
for all RS4 cars.
Obrigado pelo seu feedback!
There is one more function that has to be implemented - function for summing values. For example, we may want to calculate the total revenue for a certain item.
To sum values in column use SUM
function followed by column which values you want to sum. For our abstract example,
SELECT SUM(revenue) FROM sells WHERE item = 'Sofa'
Please note, that
SUM
function works only with numeric columns.
Tarefa
From the audi_cars
table calculate the total tax
for all RS4 cars.