SELECT c0_.id AS id_0, c0_.created AS created_1, c0_.affiliate_network AS affiliate_network_2, c0_.affiliate_account AS affiliate_account_3, c0_.description AS description_4, c0_.full_content AS full_content_5, c0_.tag_product AS tag_product_6 FROM campaign c0_
LEFT JOIN campaign_taggeneral c2_ ON c0_.id = c2_.campaign_id
LEFT JOIN tag_general t1_ ON t1_.id = c2_.tag_general_id
WHERE t1_.id IN (?)
AND c0_.created >= ? AND c0_.created <= ? ORDER BY c0_.created ASC
//symfony
$query->leftJoin('i.tagsGeneral', 'j')
->where('j.id in (:subCompanyId)')->setParameter("subCompanyId", $filterData->getFilterTagsGeneral());