O'Reilly logo
  • Eugene Panaitov thinks this is interesting:

collect_set(sex_age.age)[0]

From

Cover of Apache Hive Essentials

Note

Take first element under GROUP BY