select T1."Document No_" as "Document No",
	   SUM(((convert(float, T1."Line Discount Amount")))) as "Auftrags_Discount_Lohn"
from "NAVISION"."import"."Archived_Service_Header" T2,
	"NAVISION"."import"."Archived_Service_Line" T1
where ((T2."No_" = T1."Document No_") and (T2."Client_DB" = T1."Client_DB"))
and (((((T1."Document No_" LIKE 'WAU%') and (T2."Order Date" >= convert(datetime, '2017-01-01 00:00:00.000'))) and (((convert(float, T1."Line Discount Amount"))) <> 0)) and (T1."Type" = 3)) and (T1."Document No_" <> 'WAU17422406'))
group by T1."Document No_"
-- order by "Document No" asc