Total mark improvements

Total mark computation with Query