http://postimage.org/delete/pwnan1ud4/
上面链接的图片中有重复的行(列名称:aracId)。如何修改唯一行的查询。
由于您的图像不可见,请尝试添加DISTINCT
您的SELECT
子句。例子,
SELECT DISTINCT *
FROM tableName
尝试这个 :
With Cte as
(
Select row_number() over (partition by arac.aracID order by arac.aracID ) as row
-- other columns
left join ...
Where .... and
tip.tipadi in ('Kamyon','Kamyonet','Tir')
)
Select cte.aracID, cte.Model, ..........
from cte where cte.row=1