To do this correctly, you need distinct in the subquery. Otherwise, you can propagate strings in the connection version:
SELECT q.PKID, q.QuestionText, q.Type FROM Questions q join (select distinct FirstQuestion from Batch b join user u on b.batchnumber = u.batchnumber and u.RandomString = '$key' ) fq on q.pkid = fq.FirstQuestion
As for improving the version of in or join ., It depends. In some cases, especially if indexes are indexed, the in version can be great.
source share