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

Зміст курсу

SQL Basics

SQL Basics

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

Mean values

The next function we will talk about - is mean. Mean (average) is probably one of the most simple and usable statistics in real life.

For example, for our audi_cars table, we can calculate the average mileage for cars manufactured in 2020. To calculate the average use AVG function followed by column name.

123
SELECT AVG(mileage) FROM audi_cars WHERE year = 2020
copy

Завдання

Using table audi_cars calculate the average price of the A4 model manufactured in 2018.

Завдання

Using table audi_cars calculate the average price of the A4 model manufactured in 2018.

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

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

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

Mean values

The next function we will talk about - is mean. Mean (average) is probably one of the most simple and usable statistics in real life.

For example, for our audi_cars table, we can calculate the average mileage for cars manufactured in 2020. To calculate the average use AVG function followed by column name.

123
SELECT AVG(mileage) FROM audi_cars WHERE year = 2020
copy

Завдання

Using table audi_cars calculate the average price of the A4 model manufactured in 2018.

Завдання

Using table audi_cars calculate the average price of the A4 model manufactured in 2018.

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

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

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

Mean values

The next function we will talk about - is mean. Mean (average) is probably one of the most simple and usable statistics in real life.

For example, for our audi_cars table, we can calculate the average mileage for cars manufactured in 2020. To calculate the average use AVG function followed by column name.

123
SELECT AVG(mileage) FROM audi_cars WHERE year = 2020
copy

Завдання

Using table audi_cars calculate the average price of the A4 model manufactured in 2018.

Завдання

Using table audi_cars calculate the average price of the A4 model manufactured in 2018.

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

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

The next function we will talk about - is mean. Mean (average) is probably one of the most simple and usable statistics in real life.

For example, for our audi_cars table, we can calculate the average mileage for cars manufactured in 2020. To calculate the average use AVG function followed by column name.

123
SELECT AVG(mileage) FROM audi_cars WHERE year = 2020
copy

Завдання

Using table audi_cars calculate the average price of the A4 model manufactured in 2018.

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