SELECT *FROM courseware_visit_history_info vWHERE v.COURSEWARE_VISIT_ID='000bf820b2574f8dabdc2bb1c7c63241' AND v.VISIT_TIME BETWEEN date_sub(NOW(),interval 7 day) AND NOW()