select right(aa.c, length(aa.c) - locate(',', aa.c))from ( select group_concat(id) as c from tb_xl_route group by shop_id, type, route having count(1) > 1 ) aa