SELECT *
FROM t1 a
INNER JOIN t2 b ON a.id = b.id
WHERE b.s1 = 97
AND a.id IN (382, 383)
	AND b.c9
	IN (SELECT b.c9
	FROM t1 a
	INNER JOIN t2 b ON a.id = b.id);