Question: I need to remove the + - values records mean to say 

I need only Blue colored two records from the output windows.
Hope its clear what exactly I want. 

```
User5   |  -15
User6   |  -10

```

![I need only Blue colored two records.](https://i.stack.imgur.com/KZvGD.png)

Answer: 
The idea is to get rows whose second column, in my case it's `Val`, is are cancelled out. You can do it by getting the absolute value and assign a row number grouped by absolute value and the value itself. Those row number that does not have a match should be the result.

```
WITH SampleData(UserID, Val) AS(
    SELECT 'User1', -10 UNION ALL
    SELECT 'User2', 10 UNION ALL
    SELECT 'User3', -15 UNION ALL
    SELECT 'User4', -10 UNION ALL
    SELECT 'User5', -15 UNION ALL
    SELECT 'User6', -10 UNION ALL
    SELECT 'User7', 10 UNION ALL
    SELECT 'User8', 15 
)
,Numbered AS(
    SELECT
        UserID,
        Val,
        BaseVal = ABS(Val),
        RN = ROW_NUMBER() OVER(PARTITION BY ABS(Val), Val ORDER BY UserId)
    FROM SampleData
)
SELECT 
    n1.UserID,
    n1.Val
FROM Numbered n1
LEFT JOIN Numbered n2 
    ON n2.BaseVal = n1.BaseVal
    AND n2.RN = n1.rn
    AND n2.UserID <> n1.UserID
WHERE n2.UserID IS NULL
ORDER BY n1.UserID

```
Appears that you want rows where the total does not equal 0?

```
    select 
      userName, 
      userValue 
    from 
      yourTable
    where 
      userName in (
      select userName from yourTable 
      group by userName 
      having sum (userValue) <> 0
    )

```