PERCENTILE_DISC
Finds a percentile among existing values — a median that's definitely in the data.
Syntax
PERCENTILE_DISC(<fraction>) WITHIN GROUP (ORDER BY <expression>)
Sorts the values and returns the first one at which the given share of rows is reached. Unlike PERCENTILE_CONT, it doesn't invent a midpoint between two values, so it works with dates and text too.