I'd like to create a custom SQL query to be run through the configurable Reports which gives me for a given course id, all questions that were attempted by all users within the last day and also show the questions, whether they got it right or not cumulatively from multiple activity modules. I have about 30 questions in a category and there are different types of activities that use these same questions - for eg. a quiz, a couple of games etc. I want teachers to be able to pull a report that lists the number of questions each of their students worked on last night. I say worked on because, even if the student did not "finish an attempt" in a quiz, I want to be able to report that they tried 8 questions and got 6 right in this quiz and then did 5 questions by playing the quizverse quiz for example.
The table at the end of it I think would look like this:
I have been confused about how to go about this. Activity logs seem to be right place to start but it doesn't give me all the info. Any pointers?