Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Assign Performance Quartiles | Ranking and Analytic Window Functions
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Window Functions in SQL

bookChallenge: Assign Performance Quartiles

Task

Swipe to start coding

Write a query to assign each employee to a performance quartile using NTILE based on their average review score.

  • Calculate the average review score for each employee.
  • Use NTILE(4) to divide employees into four quartiles based on their average review score, with quartile 1 being the highest scores.
  • Return each employee's ID, name, average score, and their assigned performance quartile.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 4
single

single

Ask AI

expand

Ask AI

ChatGPT

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

Suggested prompts:

Can you explain this in simpler terms?

What are the main benefits or drawbacks?

Can you give me a real-world example?

close

bookChallenge: Assign Performance Quartiles

Swipe to show menu

Task

Swipe to start coding

Write a query to assign each employee to a performance quartile using NTILE based on their average review score.

  • Calculate the average review score for each employee.
  • Use NTILE(4) to divide employees into four quartiles based on their average review score, with quartile 1 being the highest scores.
  • Return each employee's ID, name, average score, and their assigned performance quartile.

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Β 2. ChapterΒ 4
single

single

some-alt