I have a really tricky SQL issue which I can't get to the bottom of. I have a SQL view which lists servers and their power connections to power strips (around 44,500 connections to around 8,000 power strips. What I now need to do is create a view which shows a single entry for each power strip and its total load in watts. 

This is a short example of the table that I'm working from:

```
POWERSTRIP_VOB_ID                       DEVICE_VOB_ID                           WATTS
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    988BD4A4-CAC7-4CC9-B1F8-274D75C48796    17
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    67174BE5-9065-4131-8817-EB584F940A39    17
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    44713911-F1D8-45E6-9FFA-DCD29F0A5EDA    1164
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    D4495808-AE45-4F8E-ADB0-A97C5F79FD70    17
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    A9B17915-85F2-4FE1-915A-044312177845    7481
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    5AC7AA8A-8A56-4E09-A607-98985782B32B    1746
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    A9B17915-85F2-4FE1-915A-044312177845    7481
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    A9B17915-85F2-4FE1-915A-044312177845    7481

```

As you can see, all of the lines have the same `POWERSTRIP_VOB_ID`. In this example all of the servers have at least one connection to this powerstrip. You will also note that the Device starting with `A9B17915` has three connections to the power strip. 

If I use `DISTINCT` and `GROUP BY` the `POWERSTRIP_VOB_ID` with a SUM on Watts I get a result of 25,404. What I need to do is essentially ignore any of the duplicate connections so that the query only sums the servers once for the powerstrip . 

In this example I would be looking for the sum of:

```
POWERSTRIP_VOB_ID                       DEVICE_VOB_ID                           WATTS
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    988BD4A4-CAC7-4CC9-B1F8-274D75C48796    17
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    67174BE5-9065-4131-8817-EB584F940A39    17
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    44713911-F1D8-45E6-9FFA-DCD29F0A5EDA    1164
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    D4495808-AE45-4F8E-ADB0-A97C5F79FD70    17
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    A9B17915-85F2-4FE1-915A-044312177845    7481
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    5AC7AA8A-8A56-4E09-A607-98985782B32B    1746

```

This should result in 1 record in the view which would be something like:

```
POWERSTRIP_VOB_ID                       WATTS
5FA38587-FA3E-4BF0-B87C-B782B0FD9284    10442

```

Hopefully I've explained that well enough.

I've played with `GROUP BY`, `DISTINCT` and `SUM(DISTINCT)` and can't seem to get the output that I need.

Any help would really be appreciated.

Many Thanks

Simon