help in file table in moodle

Re: help in file table in moodle

by m question -
Number of replies: 1
until now I got this
but the results still not correct

select r.course,count(*)

from prefix_files f
JOIN prefix_context cx ON f.contextid=cx.id
JOIN prefix_resource r ON cx.instanceid=r.id
where mimetype="application/vnd.ms-powerpoint.presentation.macroEnabled.12"
OR mimetype="application/vnd.openxmlformats-officedocument.presentationml.presentation"
OR mimetype="application/vnd.openxmlformats-officedocument.presentationml.slideshow"

GROUP BY r.course
In reply to m question

Re: help in file table in moodle

by m question -
how to know which file is deleted and also which files uploaded by teacher from mdl_files table
or can I have this data from other tables ? what are these tables?