Yes.
Hello, you can try this SQL. You can obtain the sum of files in all folders that belong to one courseid. In the example 47255.
select sum(filesize) from mdl_files f, (select ctx.id from mdl_course_modules AS cm INNER JOIN mdl_context AS ctx ON ctx.contextlevel = 70 AND ctx.instanceid = cm.id INNER JOIN mdl_modules AS mdl ON cm.module = mdl.id LEFT JOIN mdl_folder AS d ON cm.instance = d.id where d.course = 47255 and cm.course = 47255) folder where f.contextid = folder.id;
Regards