Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgresql make each element in array distinct

SELECT ARRAY(SELECT DISTINCT unnest(t_column)) FROM t_name;
Comment

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);
Comment

PREVIOUS NEXT
Code Example
Sql :: how to connect mysql with specify port thorugh cmd 
Sql :: sql get table last modified time 
Sql :: mysql insert generate serie 
Sql :: import sql file in mysql 
Sql :: get rows affected mysql python 
Sql :: oracle view source 
Sql :: how to delete duplicate rows in oracle 
Sql :: oracle apex list connected users 
Sql :: sql get guid 
Sql :: inner join just one row 
Sql :: how to see all table partition in oracle 
Sql :: sql string_agg 
Sql :: how to move a columns location in mysql 
Sql :: oracle stop 
Sql :: power query concatenate 
Sql :: reset auto increment in mysql 
Sql :: mysql sum cast decimal without round 
Sql :: remove transient options sql wordpress 
Sql :: create column sql 
Sql :: mysql query unique column 
Sql :: ms sql truncate table vs delete 
Sql :: oracle asynchronous procedure 
Sql :: create function in microsoft sql server 
Sql :: org.h2.jdbc.JdbcSQLSyntaxErrorException 
Sql :: how to reset table in sql server 
Sql :: join to find results not in another table 
Sql :: delete role postgres 
Sql :: how to add unique key constraint in mysql 
Sql :: create unique index postgres 
Sql :: sql group by year 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =