That's exactly what I wound up doing, I was searching for hours and found this info
It turned out to be really simple.
I am making a pie chart and it needs data like this,
$data = explode('*',$data);
every time I try to mess that I get errors somewhere, but everything works now so I'm
happy. that group by count is very powerful and simple.I also used AND state !='' for empty state values
I get the date into array like