Grouping Cassandra columns using Solr

Author: Robot_01

Originally Sourced from: https://stackoverflow.com/questions/59258658/grouping-cassandra-columns-using-solr

Is it possible to Group By the Cassandra columns using solr?

I have 2 columns

ColumnA ColumnB
A         XYZ
B         BCD
C         CDE
D         DEF
A         XYZ
D         DEF
E         XYZ
A         XYZ

I want to get the count of ColumnA where ColumnB='XYZ' as below

ColumnA   count(*)
A            3
E            1

I am able to get total counts

select count(*) from table 
where solr_query='{"q" : "columnB:XYZ"}

but not sure how to use the below to get Column wise

solr_query='{"q" : "columnB:XYZ"},{group=true&group.field=columnA}

Thanks in Advance.