Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
SQL - Unpivot Table
with t(id ,loc , val1 ,val2 ,val3 ,val4) as ( select 1 ,'loc1' , 10 ,190 ,null , 20 union all select 2 ,'loc2' , 20 ,null ,10 , 10 ) SELECT * FROM ( select id, loc, val1 as val from t a UNION ALL select id, loc, val2 as val from t a UNION ALL select id, loc, val3 as val from t a UNION ALL select id, loc, val4 as val from t a ) x order by ID
run
|
edit
|
history
|
help
0
Testing psql
podd version
SQL - Social Network Analysis by Patrick Lin
Ass2 q2
Select all countries that can be found by recursively adding all neighbouring countries (PostgreSQL)
Many to many
m,,nm,
FINALE fdjfnkds
1
timestamp sample