Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
SUMming values | Aggregating
SQL Basics
course content

Зміст курсу

SQL Basics

SQL Basics

1. Selecting
2. Filtering
3. Aggregating
4. Sorting
5. Grouping
6. Practicing

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,

123
SELECT SUM(revenue) FROM sells WHERE item = 'Sofa'
copy

Please note, that SUM function works only with numeric columns.

Завдання

From the audi_cars table calculate the total tax for all RS4 cars.

Завдання

From the audi_cars table calculate the total tax for all RS4 cars.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 2
toggle bottom row

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,

123
SELECT SUM(revenue) FROM sells WHERE item = 'Sofa'
copy

Please note, that SUM function works only with numeric columns.

Завдання

From the audi_cars table calculate the total tax for all RS4 cars.

Завдання

From the audi_cars table calculate the total tax for all RS4 cars.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 2
toggle bottom row

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,

123
SELECT SUM(revenue) FROM sells WHERE item = 'Sofa'
copy

Please note, that SUM function works only with numeric columns.

Завдання

From the audi_cars table calculate the total tax for all RS4 cars.

Завдання

From the audi_cars table calculate the total tax for all RS4 cars.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

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,

123
SELECT SUM(revenue) FROM sells WHERE item = 'Sofa'
copy

Please note, that SUM function works only with numeric columns.

Завдання

From the audi_cars table calculate the total tax for all RS4 cars.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 3. Розділ 2
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt