在symfony中的querybuilder中使用查询和子查询

i use simple code mysql and me cant generate this code to querybuilder please help me

SELECT *
FROM `sites` AS s
WHERE s.`quantity` > 0 AND s.`status` = 1 AND (SELECT count(`visitsite`.`id`)
                                               FROM `visitsite`
                                               WHERE `visitsite`.`site` = s.`id` AND
                                                     `visitsite`.`createdate` > '2016-10-25 00:00:00'
                                              ) < (SELECT `quantity`
                                                   FROM `limitviewday`
                                                   WHERE `limitviewday`.`id` = s.`limitviewday`)