this is the example. from this i want to find each professional count and each age group count.
filter_data = FILTER customer by loc=='us';
grunt> grp_data1 = GROUP filter_data by age;
grunt> cnt_data = FOREACH grp_data1 generate group,COUNT(customer);


You are trying to use a
GROUP BYstatement usingfilter_data. So, the same variable name has to be used insideCOUNTfunction.