Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
cpana
/* wanted result: a | b | c | d | e ---+---------------+---------+------------------+--------------------- 1 | abc | {a,b,c} | 2019-03-19 23:00 | 2 | def | {1,2,3} | | 4 | {a,b,c,d,e,f} | Ac | 2019-03-19 23:00 | 2019-03-19 19:00:00 3 | | 13 | | no data (4 rows) obviously avoiding manipulations with letters and numbers - structing from given data only no a+1 to get 2 and 3, or select '{a,b,c,d,e,f}' to get b column third line please */ with c as (values (1,'abc','{a,b,c}','2019-03-19 23:00','') , (2, 'def','{1,2,3}','','') , (4,'{abcdef}','Ac','2019-03-19 23:00','2019-03-19 19:00:00') , (3,'','13','','no data' ) ) select c.column1 as a, c.column2 as b, c.column3 as c, c.column4 as d, c.column5 as e from c;
run
|
edit
|
history
|
help
0
2
Movie Rating SQL Analysis Project
Q2
Timestamps in PostgreSQL
prueb final
E-commerce Website SQL Analysis
Movie Rating SQL Analysis Project
Joins and Case
Select rows with no intersection on join table and check by date
cte