Is it possible to translate this query

Currently I am triying to implement a paginator. But I've used db->fetchAll

Is is possible to translate to PHQL

$courses = $this->db->fetchAll("SELECT * FROM course "
                   . "where course.id IN( SELECT DISTINCT(course_id) FROM course_timing tim WHERE tim.date >= CURDATE() ORDER BY date) ", Db::FETCH_OBJ);

PHQL doesn't support sub queries.