select count(typeSeller) count, typeSeller from (
select s.ads_id, container_list, s.sort_integer_2 price,
group_concat(if(p.param_id = 313, p.float_value, NULL)) count_rooms,
group_concat(if(p.param_id = 314, p.float_value, NULL)) square,
group_concat(if(p.param_id = 700, p.float_value, NULL)) typeSeller,
group_concat(if(p.param_id = 730, REPLACE(p.string_value, ' квартал', ''), NULL)) kvartal,
group_concat(if(p.param_id = 731, p.string_value, NULL)) year
from SITE_ADS s, ads_params p
where filter_integer_07 = and s.ads_id = p.ad_id
GROUP BY p.ad_id) r group by typeSellerYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and s.ads_id = p.ad_id
GROUP BY p.ad_id) r g' at line 9 in query