Does Apache Drill Supports Sql Pivot.
I have this:-
SQL QUERY for Creating TABLE is:-
`create table Attribute (ID int ,Name varchar(250))`.
INSERT QUERY is:-
`insert into Attribute values(1, 'Description'),
(2, 'StockNumber'),
(3, 'Price'),
(4, 'Logo'),
(5, 'Diagram');`
I want show row data (i.e:- Description, StockNumber, Price, Logo, Diagram)
as column.
I have this sql pivot query:-
`select *
from
(
select id,name
from Attribute
) d
pivot
(
max(id)
for name in ([Description],[StockNumber],[Price],[Logo],[Diagram]
) piv;`
How to convert this sql query in apache drill.?
OR Is There any other solution for that.?
......................
Thanks & Regards