for example, I have a table A
create table A (
id Int64,
discrete1 String
discrete2 String
) engine=Log;
and some data
insert into A values
(1,'A','a')
(1,'B','b')
(1,'A','c')
(2,'C','a')
(1,'A','a');
How can I select this result,the tuple is (value,count)
1,[(A,3),(B,1)],[(a,2),(b,1),(c,1)]
2,[(C,1)],[(a,1)]
My table may have many discrete value columns, is there any way to do that in one select without group by discrete value columns one by one.