Not the best solution 😛 but this could help you:
select
distinct(p.ID)
from
wp_posts p,
wp_term_relationships r,
wp_term_taxonomy tt,
wp_terms t
WHERE
p.post_author in (1, 2, 3)
and r.object_id = p.ID
and tt.term_taxonomy_id = r.term_taxonomy_id
and tt.taxonomy = 'category'
and tt.term_id = t.term_id
and t.term_id in (1, 2, 3);