Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Calculate Average Bonus | Null Functions
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Functions in SQL

bookChallenge: Calculate Average Bonus

Завдання

Swipe to start coding

Write a query to calculate the average bonus for all employees in the employees table, treating any NULL bonus values as zero.

  • Use the COALESCE function to replace any NULL value in the bonus column with zero.
  • Calculate the average of these values.
  • The result should be a single column named avg_bonus.

Рішення

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

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 5. Розділ 5
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you explain that in more detail?

What are the main benefits or drawbacks?

Can you give me an example?

close

bookChallenge: Calculate Average Bonus

Свайпніть щоб показати меню

Завдання

Swipe to start coding

Write a query to calculate the average bonus for all employees in the employees table, treating any NULL bonus values as zero.

  • Use the COALESCE function to replace any NULL value in the bonus column with zero.
  • Calculate the average of these values.
  • The result should be a single column named avg_bonus.

Рішення

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

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 5. Розділ 5
single

single

some-alt