Select *
from matches m
inner join match_opponents op on op.match_id = m.match_id
where m.status like "started";
select
m.match_id,
min(opponent_id) as op1, max(opponent_id) as op2
from match_opponents op
inner join matches m on op.match_id = m.match_id
where m.status = "started"
group by m.match_id;