#294 Refactoring Select Unread Message Query