我使用简单的代码mysql,我无法生成此代码到querybuilder 请帮帮我
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`)