MDL-41316 tool_spamcleaner: Fix sql queries

AS keyword is not allowed in sql qeries for table alias as Oracle doesn't support it
Thanks to Sara Cenni for suggesting the patch