Median



Returns the median (middle) value in each group. For an even number of values it is the average of the two middle values.

Numeric Median(AggregationArray valuesArray)

round-pushpin Groups the synonyms by source word and computes Median of the target word ids.
SELECT
    SourceWordId,
    Median(TargetWordId) as Result
FROM
    WordList:Synonym
GROUP BY
    SourceWordId