I am having a problem where I can't find a way toi get a group by rollup to function. The code is posted below. Workbench says that I cant group by these options. It seems to work when not adding in the "rollup", but fails after. Any help is much appreciated.
Select count(IUCR_id) as totalIUCR, crime.year, (select count(crime_id) as 'totalcrime')
from iucr, crime
where crime.IUCR = iucr.iucr_id and iucr.iucr_id = '110,130,141,142,051A,051B,520,530,545,550,551-560,261-266, 271-275, 281, 291,031A, 031B, 033A, 033B, 041A, 041B, 450, 451, 480, 481, 488, 489, 490, 491'
group by crime.year, rollup ('totalcrime');