Challenge: 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
COALESCEfunction to replace anyNULLvalue in thebonuscolumn with zero. - Calculate the average of these values.
- The result should be a single column named
avg_bonus.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 5. Розділ 5
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Suggested prompts:
Can you explain that in more detail?
What are the main benefits or drawbacks?
Can you give me an example?
Чудово!
Completion показник покращився до 2.86
Challenge: 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
COALESCEfunction to replace anyNULLvalue in thebonuscolumn with zero. - Calculate the average of these values.
- The result should be a single column named
avg_bonus.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 5. Розділ 5
single