select
*
from emp
where id
(select order
from department
where name = 'testing'
order by order asc)
I am getting ordered data from the inner query and with the id's I get I should get the result from the emp table to be in the same order as the inner query.