select id_a from a where exists(select id_b from b where id_b = a.id_a) or exists(select id_c from c where id_c = a.id_a)
where check_a != 0
order by id_a ASC limit 0,10
select id_a from a where exists(select id_b from b where id_b = a.id_a) or exists(select id_c from c where id_c = a.id_a)
AND check_a != 0
order by id_a ASC limit 0,10