PERCENT_RANK for Distribution Analysis

Hard
window-functions Two Sigma Amazon Uber

Write a query using PERCENT_RANK() to show each product's price percentile. Return name, price, and price_percentile (rounded to 2 decimal places), ordered by price DESC.

Expected Output: Products with their price percentile rank.

Tables

Hints (3 available)

SQL Editor

Output

Click "Run" to see results...