query to change an element and to get sum of any range