>>>
>>>Sir I wrote this query by myself
>>>
>>>SELECT a.code, a.names, a.country,b.qty
>>>FROM #table1 a,
>>> (
>>> SELECT code, sum(qty)as qty
>>>FROM #table1
>>> GROUP BY code
>>> ) b
>>>WHERE a.code = b.code
>>>
>>>
>>>This display the correct sum of qty but with double row like this
>>>
>>>1104 ERIC Holland 110
>>>1104 ERIC Holland 110
>>>1105 Boris Bulgaria 90
>>>1105 Boris Bulgaria 90
>>>1106 Anil India 100
>>>1106 Anil India 100
>>>1107 Cetin Turkey 150
>>>1107 Cetin Turkey 150
>>>
>>>It will be great help if you modify this query.
>>>
>>>Please
>>
>>If you meant to get this output, then it is a correct way to write it. Another way is:
>>
>>
>>SELECT code, names, country,
>> SUM(qty) OVER (PARTITION BY code) AS qty
>>FROM #Table1
>>ORDER BY code;
>>
>
>Sir your above query shows double result like shown in attachment.
I don't understand what you want. Wasn't that what you requested?