SELECT DISTINCT "Resource No",
	"Service Order No",
	"Service Job No",
	"Order_job_No",
	SUM(c14) OVER (PARTITION BY "Order_job_resource") AS "Summe_Order_Job",
	"Order_job_resource"
FROM (
	SELECT ((T1."Service Order No_" + '_' + (rtrim((((T1."Service Job No_")))))) + '_' + (T1."Resource No_" + ' - ' + T2."Name")) AS "Order_job_resource",
		T1."Service Order No_" + '_' + (rtrim((((T1."Service Job No_"))))) AS "Order_job_No",
		T1."Service Job No_" AS "Service Job No",
		T1."Service Order No_" AS "Service Order No",
		T1."Resource No_" + ' - ' + T2."Name" AS "Resource No",
		((convert(FLOAT, T1."Duration"))) AS c14
	FROM "Gottstein7x"."dbo"."AH Gottstein$Employee" T2,
		"Gottstein7x"."dbo"."AH Gottstein$Time Clock Entry" T1
	WHERE (T2."No_" = T1."Employee No_")
		AND (
			(
				(
					(T1."Date" >= convert(DATETIME, '2022-01-01 00:00:00.000'))
					AND (T1."Sorting" = 0)
					)
				AND (T1."Canceled" = 0)
				)
			AND (T1."Service Order No_" <> '')
			)
	) D1
	-- order by "Order_job_resource" asc,"Order_job_No" asc
