Today a colleague ask me the question if we could reduce the scope of the following query and then perform an update:
The idea was to convert it to something particularly more updated since this script creates an update statement that then you will need to execute, so looking after it the need was:
Limit the user base to only Instructors
Try it first for only one user
Change the quota to 500Mb
Able to modify it if needed to use another user base.
What we do?
Well we start reviewing the gist:
And then we finish building our own:
If you want more information on it, I would encourage that you read the comments inside the gist and how to execute it.
Also, you need to have the proper privileges to do it, since being the basic user don't have enough permissions.