Max



Returns the largest numeric value in each group. Use MaxString for text.

Numeric Max(AggregationArray valuesArray)

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