Aggiunta modello + vista e stored x calcolo statistiche chiamate

This commit is contained in:
Samuele Locatelli
2024-05-31 19:24:36 +02:00
parent a714b5388b
commit 6ccbffdecf
8 changed files with 593 additions and 20 deletions
+21
View File
@@ -0,0 +1,21 @@
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE VIEW [dbo].[v_StatsCall]
AS
WITH cteDati AS
(
SELECT YEAR(DataRif) AS YearRef, CodInst, CodApp, SUM(NumCall) AS TotCall
FROM LogCall
GROUP BY YEAR(DataRif), CodInst, CodApp
)
SELECT *
FROM cteDati
ORDER BY YearRef DESC, TotCall DESC
GO