Salomé
The usual solution is the add a WHERE clause to the end to limit to a specific course. If you search the contributed reports page https://docs.moodle.org/35/en/ad-hoc_contributed_reports you will see many examples that look like this:
WHERE c.id=16
which means restrict the results to the course with id number 16. You can also use the course shortname or fullname here too, but since the course id never changes, it is the most reliable way. Some examples there use a placeholder like
WHERE c.id=##
which means the query is made for you to put in the course id for the course you want on your site.
Randy