I have this query:

```
SELECT TwI_TwIId,
       TwI_TwrId,
       TwI_MagId,
       SUM(TwI_Ilosc) AS Ilosc,
       SUM(TwI_Wartosc) AS Wartosc,
       SUM(TwI_Braki) AS Braki,
       SUM(TwI_Rezerwacje) AS Rezerwacje,
       SUM(TwI_Zamowienia) AS Zamowienia
FROM cdn.TwrIlosci
WHERE twi_magid = 1
GROUP BY TwI_TwrId,
         TwI_TwIId,
         TwI_MagId
ORDER BY TwI_TwIId;

```

I don't know why but this query can't scale duplicate TwI\_TwrId.

I have this result:

![Look Here](https://i.stack.imgur.com/XYhEe.png)