Moodle Administrators are very much interested in running different SQL queries to extract various reports and information from the Moodle…