SELECT DISTINCT TOP 100
t.[kod_ref]
,t.[urunadi]
,t.[fiyat]
,(SELECT SUM(cast(miktar as integer)) [kod_ref] from [CAGLAYAN_WEB].[dbo].[siparis]
where kod_ref = t.kod_ref) as sa
FROM [CAGLAYAN_WEB].[dbo].[siparis] t order by sa desc
Merhaba
YanıtlaSil