在我看来,你需要 group_concat()
group_concat()
select tcb_name ,status, group_concat(scope_name separator ',') as list_of_scope from your_table group by tcb_name,status