It is possible to generate the following query by CI Query Builder class ?
SELECT name FROM table1 t1 JOIN
this library can help you to use sub queries with query builder have look on the doc of this library
sub query with query builder