How to transpose a query result in ClickHouse ? ( Rows to Columns )

227 Views Asked by At

I am looking for an easy way to Transpose the Query Output in rows & columns (not one row in text by using Format Vertical ) .

My Query gives me an output like this :-

Query Output

And I want the output in the transposed format like this :-

Desired Output

I don't want to change any Data Type(s) and use it multiple times under a Parent Query . Also, I am using DBeaver Client for the process.

I have went through the Pivot () , Unpivot() Functions used in SQL, SQL-Server but that doesnt work here. I tried searching the Clickhouse Documentations but couldnt find anything more on this either .

Any help would be appreciated , Thanks !

0

There are 0 best solutions below