Is there a code in sql that will allow me to get a median of column x within each percentile I pulled in one select statement? Here is the percentiles I pulled. I am trying to avoid coding the median individually and merge them together. Thanks!
PERCENTILE_CONT(0.01) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_01,
PERCENTILE_CONT(0.05) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_05,
PERCENTILE_CONT(0.10) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_10,
PERCENTILE_CONT(0.20) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_20,
PERCENTILE_CONT(0.30) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_30,
PERCENTILE_CONT(0.40) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_40,
PERCENTILE_CONT(0.50) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_50,
PERCENTILE_CONT(0.60) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_60,
PERCENTILE_CONT(0.70) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_70,
PERCENTILE_CONT(0.80) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_80,
PERCENTILE_CONT(0.90) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_90,
PERCENTILE_CONT(0.99) WITHIN GROUP (ORDER BY PP01DS ASC) as percentile_99,