Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

array aggre distinct postgres

SELECT ARRAY(SELECT DISTINCT e FROM unnest(ARRAY[a,b,c,d]) AS a(e))
FROM ( VALUES
  ('foo', 'bar', 'foo', 'baz' )
) AS t(a,b,c,d);
Source by dba.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #array #aggre #distinct #postgres
ADD COMMENT
Topic
Name
2+9 =