Only this week, get the SQL Complete Track of 9 courses in a special prize of $330$89!
Introduction
Simple OVER()
PARTITION BY
Ranking functions
Window frame
Analytic functions
ORDER BY PARTITION BY
Order of evaluation
31. Grouping by ntiles
Summary

Instruction

Precisely so! That's going to be the last question in this part.

Exercise

Divide subscriptions into three groups (buckets) based on the payment_amount. Group the rows based on those buckets. Show the following columns: bucket, minimal payment_amount in that bucket and maximal payment_amount in that bucket.

Stuck? Here's a hint!

Use NTILE(3) in a subquery and rename it to bucket. In the outer query, use it to group the rows.