I try create query with subquery in TypeORM.
const query = await this.contactRepository.createQueryBuilder(\'c\') .select([\'c.id\', \'c.type_id\',