SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO
CREATE VIEW [test].[Aftersales_Rechnungen_ben_AW_final] AS
SELECT year([Invoice_Date]) AS [Jahr]
     , [Hauptbetrieb_ID]
     , [Standort_ID]
     , [Fabrikat]
     , convert(decimal(10,2), sum([ben__Std_])) AS [ben_Std]
FROM [transform].[Aftersales_Rechnungen_ben_AW_final]
GROUP BY year([Invoice_Date]), [Hauptbetrieb_ID], [Standort_ID], [Fabrikat]
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

GO
