Hi all,
I'm a first-time poster so apologies if I've posted in the wrong place or this questions has been asked before (I've had a look but couldn't find anything)
I would like to write an SQL report that counts the number of enrolment methods by course. What I have so far is:
SELECT c.fullname AS 'Course',
e.enrol AS 'Method',
Count(e.enrol) AS 'Count'
FROM {user_enrolments} AS ue
JOIN {enrol} AS e ON e.id = ue.enrolid
JOIN {course} AS c ON c.id = e.courseid
GROUP BY c.fullname, e.enrol
However I would like the count to be for course enrolments started within the last 7 days.
Could anyone please give me a little help? I'd really appreciate it
Thanks
Stuart