First Commit - Source Code from Reply

This commit is contained in:
vincenzofariello
2024-05-13 12:54:14 +02:00
parent 73e32a5020
commit a15aee1f08
11184 changed files with 1065913 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
INSERT INTO dwh.MNP_DW_REPORT_CAPACITAEVASIONE
(MESE, GIORNI_LAVORATIVI, RICHIESTE_PRESEINCARICO, RICHIESTE_SCARTATE_WAITLIST, RICHIESTE_SCARTATE_MANPROGR)
VALUES(
TO_CHAR(Last_Day(ADD_MONTHS(sysdate,-2))+1,'MM/YYYY'),
dwh.FUN_GIORNI_LAVORATIVI(Last_Day(ADD_MONTHS(sysdate,-1)), Last_Day(ADD_MONTHS(sysdate,-2))+1),
( select count(*)
from mnp_storico_richiesta t, mnp_gestione_richiesta r
where t.id_richiesta = r.id_richiesta
and (r.richiestaadhocaom = 0 and r.richiestaadhoc = 0)
and t.dataricezionerichiesta between Last_Day(ADD_MONTHS(sysdate,-2))+1 AND Last_Day(ADD_MONTHS(sysdate,-1))
and r.dataricezionerichiesta between Last_Day(ADD_MONTHS(sysdate,-2))+1 AND Last_Day(ADD_MONTHS(sysdate,-1))
and t.stato_a = 3),
( select count(*)
from mnp_gestione_richiesta t
where t.dataricezionerichiesta between Last_Day(ADD_MONTHS(sysdate,-2))+1 AND Last_Day(ADD_MONTHS(sysdate,-1))
and t.stato = 4
and (t.richiestaadhocaom = 0 and t.richiestaadhoc = 0)
and t.codice_controllo_validazione = 7),
( select count(*)
from mnp_gestione_richiesta t
where t.dataricezionerichiesta between Last_Day(ADD_MONTHS(sysdate,-2))+1 AND Last_Day(ADD_MONTHS(sysdate,-1))
and t.stato = 4
and t.codice_controllo_validazione = 3)
);
INSERT INTO dwh.MNP_DW_REPORT_CAPACITAEVASIONE
(MESE, GIORNI_LAVORATIVI, RICHIESTE_PRESEINCARICO, RICHIESTE_SCARTATE_WAITLIST, RICHIESTE_SCARTATE_MANPROGR)
VALUES(
TO_CHAR(Last_Day(ADD_MONTHS(sysdate,-3))+1,'MM/YYYY'),
dwh.FUN_GIORNI_LAVORATIVI(Last_Day(ADD_MONTHS(sysdate,-1)), Last_Day(ADD_MONTHS(sysdate,-2))+1),
( select count(*)
from mnp_storico_richiesta t, mnp_gestione_richiesta r
where t.id_richiesta = r.id_richiesta
and (r.richiestaadhocaom = 0 and r.richiestaadhoc = 0)
and t.dataricezionerichiesta between Last_Day(ADD_MONTHS(sysdate,-2))+1 AND Last_Day(ADD_MONTHS(sysdate,-1))
and r.dataricezionerichiesta between Last_Day(ADD_MONTHS(sysdate,-2))+1 AND Last_Day(ADD_MONTHS(sysdate,-1))
and t.stato_a = 3),
( select count(*)
from mnp_gestione_richiesta t
where t.dataricezionerichiesta between Last_Day(ADD_MONTHS(sysdate,-2))+1 AND Last_Day(ADD_MONTHS(sysdate,-1))
and t.stato = 4
and (t.richiestaadhocaom = 0 and t.richiestaadhoc = 0)
and t.codice_controllo_validazione = 7),
( select count(*)
from mnp_gestione_richiesta t
where t.dataricezionerichiesta between Last_Day(ADD_MONTHS(sysdate,-2))+1 AND Last_Day(ADD_MONTHS(sysdate,-1))
and t.stato = 4
and t.codice_controllo_validazione = 3)
);
commit;