如何将此查询转换为codeigniter活动记录?我已经尝试过使用活动记录的子句但是当我使用它时它没有用。
SELECT *
FROM schedule
WHERE `date` >= '2016-08-15' AND
`date` <= '2016-08-21' AND
emp_id IN (SELECT emp_id
FROM schedule
WHERE `date` >= '2016-08-15' AND `date` <= '2016-08-21'
GROUP BY emp_id
HAVING COUNT(DISTINCT `date) = 7)