Open
Description
Could we add support for UNPIVOT
in order to be able to generate a query such as
SELECT
a,
metric,
value
FROM your_table
UNPIVOT(
value FOR metric IN (m1, m2, m3, m4)
)
I think implementation should be similar to a the GROUP_BY
statement
where this
Query._from("your_table").select(
Field("a"),
Field("metric"),
Field("vaslue")
).unpivot(Field("value"), "metric", (table.m1, table.m2, table.m3, table.m4)
would generate
SELECT
a,
metric,
value
FROM your_table
UNPIVOT(
value FOR metric IN (m1, m2, m3, m4)
)
Metadata
Metadata
Assignees
Labels
No labels