Refactor query to return only 1 message instead of 20