When I run the below query:
select PRECENTILE_CONT(0.5) WITHIN GROUP (ORDER BY X) AS MEDIAN_X
from table;
I get the following error:
Function 'PRECENTILE_CONT' is not an analytic aggregate but is called with a window spec
Please let me know if you have a solution to this.