This is an extention to my previous problem, which happen to be because the item was in another table...

i have 4 tables:

**cart**

```
+------------+----------+------------+---------+
| customerid | itemcode | cartactive |  type   |
+------------+----------+------------+---------+
|       9916 | X        | Yes        | Package |
|       9916 | Y        | Yes        | Product |
+------------+----------+------------+---------+

```

**products**

```
+-------------+------------+
| ProductCode | shipWeight |
+-------------+------------+
| Y           |          1 |
| ITEM1       |          1 |
| ITEM2       |          2 |
| ITEM3       |          1 |
+-------------+------------+

```

**package**

```
+-------------+
| PackageCode |
+-------------+
| X           |
+-------------+

```

**PackageItems**

```
+-------------+-------------+
| PackageCode | ProductCode |
+-------------+-------------+
| X           | ITEM1       |
| X           | ITEM2       |
| X           | ITEM3       |
+-------------+-------------+

```

So basically but not easily im trying to get the SUM of all items in the cart which we see here should be 5.

Here is the query i wrote that is returning *Not unique table/alias: 'products'*:

```
Select 
SUM(products.shipWeight) as totalweight 
FROM 
cart 
Left JOIN products  ON products.ProductCode = cart.itemCode
LEFT JOIN packageitems d on cart.itemCode = packageitems.PackageCode
LEFT JOIN products on d.ItemCode = products.ProductCode
 WHERE 
cart.customerId= '9916' AND 
cart.cartActive = 'Yes'

```

I think i some how have to find the sum of all regular products first then find all items in the package and tally their shipping cost and add them together. I'm a little new to this. Help would be greatly appreciated.