SQL request for resource trusts update rewritten for better support.