id | market | symbol | crawl_date
----+--------+---------+------------
1 | ss | dd | 2014-10-21
2 | ss | ss | 2014-10-21
3 | ss1 | ds | 2014-10-21
4 | ss1 | sd1 | 2014-10-21
5 | ss1 | dd1 | 2014-10-21
6 | ss1 | ss1 | 2014-10-22
7 | ss1 | d11 | 2014-10-22
Get all distinct characters in column company.symbol:
- select string_agg(c,'')
- from (
- select distinct regexp_split_to_table(symbol,'') as c
- from company
- ) t;
Output:
string_agg
------------
1ds
(1 row)
No comments:
Post a Comment