SQL to get ungraded assignment submissions which have file

SQL to get ungraded assignment submissions which have file

by Ebin Manuval -
Number of replies: 0

How can I get the assignment submission which are submitted but not graded and submission type is `file`.

My Moodle version is 3.5.  This is how I selecting assignment submission with file. But how to select only ungraded files ?

SELECT count(distinct s.id) FROM `mdl_assign` asg
INNER JOIN `mdl_assign_submission` as s ON s.assignment=asg.id
LEFT JOIN `mdl_assign_plugin_config` as apc ON apc.assignment = asg.id
WHERE s.status = 'submitted'
AND (apc.plugin = 'file')

Average of ratings: -