[14:56:58] bmansurov: Submitted the patch for https://phabricator.wikimedia.org/T216721. Please take a look and provide feedback. Will make the changes as needed.
[14:58:44] As it is just a change to SQL query, I'm not sure if any test case is needed.