Renaming inner query to $update_thread_ratings_query.
Merge pull request #911 from euantorano/fix-883-multidelete-broken

Fixed #883