select count(bu_id) as c, mid(bu_address2, 1, elt((locate('', bu_address2) > 0) + 1, char_length(bu_address2), locate('', bu_address2)-2)) as k from bukken_sub where ( (bu_disp in ('', 1)) and ((((bu_type1 = '2' and bu_type2 = '1') or (bu_type1 = '1' and bu_costruct_cond = '1'))) or (bu_type1 = '2' and bu_type2 = '2') or (bu_type1 = '1' and bu_type2 = '1') or (bu_type1 = '3' and bu_type2 = '2')) and ( ( (1) and (((bu_type1 = '2' and bu_type2 = '1') or (bu_type1 = '1' and bu_costruct_cond = '1'))) ) or ( (1) and (bu_type1 = '2' and bu_type2 = '2') ) or ( (1) and (bu_type1 = '1' and bu_type2 = '1') ) or ( (1) and (bu_type1 = '3' and bu_type2 = '2') ) ) ) and ( (bu_disp in ('', 1)) and ((bu_type1 = '2' and bu_type2 = '2')) and (bu_price < 200000000) and (bu_price >= 100000000) and ((bu_full_address regexp '')) and ( ( (1) and (bu_type1 = '2' and bu_type2 = '2') and (bu_land_area <= 500) and (bu_land_area >= 400) and (bu_build_ym >= '201107') ) ) ) group by kGot error 28 from storage engine