SQL query number of active courses and number of active teachers

SQL query number of active courses and number of active teachers

by David Mesa -
Number of replies: 0

Good afternoon moodle community



I would like to know if there is a consultation that shows me the courses and active teachers. Since there are registered courses on the platform, I need to know which of these are being actively used and also identify those who are in a state of abandonment, I think it would be ideal that after one month the course will be declared inactive and in the same way Happens in the case of teachers.
I have a table that I call indicators is something like this:

| Id period | Active Courses | Courses in total | Active Teachers | Teachers in total |

| 2017-1 | ? | 53 | ? | 47 |

So where is the question mark is what I lack, I would appreciate your great help.

Thanks and regards.

Attachment Captura.PNG
Average of ratings: -