• It doesn't seem to update the results the right way, at least from my understanding..

    I get results as

    pidnamesales

    1gary 100 --instead of 230

    2sam 90 -- instead of 130

    Did I understand this correctly? Or what is it that the query is trying to do?

    ----------------------------------------------------