unique-agg Returns the unique not null value OR raise an exception language: also available in: SELECT c1, unique_agg(c2) FROM t1 GROUP BY c1; License MIT