Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn SUMming values | Aggregating
SQL Basics
Sectionย 3. Chapterย 2
single

single

bookSUMming values

Swipe to show menu

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.

Task

Swipe to start coding

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

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Sectionย 3. Chapterย 2
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt