Moodle community sites

examples of a batch delete query to delete spam forum messages ?