## replace "sale" with variable name and "sales" with table name
SELECT PERCENTILE_CONT(0.5) WITHIN GROUP(ORDER BY sale) FROM sales;