Mode



Returns the value that occurs most often in each group. When several values are tied, the first one encountered is returned.

Numeric Mode(AggregationArray valuesArray)

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