Hard
Window Functions
Pro Challenge

NTILE Salary Quartiles

Divide employees into four salary quartiles with NTILE(4), then return each employee's name, salary, and quartile. Return columns: first_name, salary, quartile. Order results by: salary DESC.

Preparing the interactive SQL workspace...

Challenge overview

What you will practice

Divide employees into four salary quartiles with NTILE(4), then return each employee's name, salary, and quartile. Return columns: first_name, salary, quartile. Order results by: salary DESC.

Difficulty
Advanced
SQL concept
Window Functions