add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table t (id int, user_id int, req_user_id int);
insert into t (id, user_id, req_user_id) values
(1, 1, 2),
(2, 2, 9),
(3, 7, 2);
Records: 3  Duplicates: 0  Warnings: 0
select * from t
id user_id req_user_id
1 1 2
2 2 9
3 7 2
select group_concat(id separator ',')
from (
select user_id as id from t
union
select req_user_id from t
) x
group_concat(id separator ',')
1,2,7,9