array aggre distinct postgres

Solutions on MaxInterview for array aggre distinct postgres by the best coders in the world

showing results for - "array aggre distinct postgres"
Lilli
11 Jun 2017
1SELECT ARRAY(SELECT DISTINCT e FROM unnest(ARRAY[a,b,c,d]) AS a(e))
2FROM ( VALUES
3  ('foo', 'bar', 'foo', 'baz' )
4) AS t(a,b,c,d);