Skip to content

Merge Struct in PartiQL #65

Answered by yliuuuu
yliuuuu asked this question in Q&A
Discussion options

You must be logged in to vote

I found a solution:

PartiQL> PIVOT sp.p at sp."s" from (SELECT s, p from [{'k1': 'v1', 'k2': 'v2'}, {'k3': 'v3', 'k4': 'v4', 'k5': 'v5'}, {'k6': 'v6'}] as c, unpivot c as p at s) sp
   |
==='
{
  'k1': 'v1',
  'k2': 'v2',
  'k3': 'v3',
  'k4': 'v4',
  'k5': 'v5',
  'k6': 'v6'
}
---

Question answered by krock21rus@ on community.partiql.org.

Replies: 1 comment

Comment options

yliuuuu
Nov 29, 2023
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by yliuuuu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant