For each order, return id, total, pct_rank and cume_dist, both computed over all orders ordered by total and rounded to 2 decimal places. Sort by total, then id.
PERCENT_RANK() is (rank - 1) / (rows - 1): 0 for the smallest, 1 for the largest.CUME_DIST() is the fraction of rows with a value less than or equal to the current one.Schema
customers(id, name, country, signup_date)
orders(id, customer_id, order_date, total)