-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDaily_Rpt.sql
99 lines (90 loc) · 3.91 KB
/
Daily_Rpt.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
select * from ige_source_evw order by 1 desc;
select * from ige_control_task order by 1 desc;
select * from ige_source_evw order by 1 desc
select * from ige_task order by 1 desc;
select * from ige_transaction order by 1 desc;
select * from linear_name_evw order by 1 desc;
select * from authorized_municipal_address_evw order by 1 desc;
*/
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
with cte as
(
select * from ige_transaction
where to_char(date_start, 'YYYYMMDD') = to_char(current_timestamp, 'YYYYMMDD')
),
cte_s as
(
select * from ige_transaction
where to_char(date_start, 'YYYYMMDD') between '20200608' and to_char(current_timestamp, 'YYYYMMDD')
)
select 'Source #' as stats_type,
count(1) as stats_today,
(select count(1) from ige_source_evw where trans_id_create in (select trans_id from cte_s) ) as "stats since June_08"
from ige_source_evw where trans_id_create in (select trans_id from cte)
union all
select 'Task #',
count(1),
(select count(1) from ige_task where trans_id_create in (select trans_id from cte_s))
from ige_task where trans_id_create in (select trans_id from cte)--where task_id > 60000013
union all
select 'Transaction #',
count(1),
(select count(1) from ( select * from cte_s ) t)
from ( select * from cte ) t
union all
select 'Control task #',
count(1),
(select count(1) from ige_control_task where trans_id_create in (select trans_id from cte_s))
from ige_control_task where trans_id_create in (select trans_id from cte)
union all
select 'AMA #',
count(1),
(select count(1) from authorized_municipal_address_evw where trans_id_create in (select trans_id from cte_s))
from authorized_municipal_address_evw where trans_id_create in (select trans_id from cte)
union all
select 'LFN #',
count(1),
(select count(1) from linear_name_evw where trans_id_create in (select trans_id from cte_s))
from linear_name_evw where trans_id_create in (select trans_id from cte)
;
/*
with cte as
(
select * from ige_transaction
where to_char(date_start, 'YYYYMMDD') = to_char(current_timestamp, 'YYYYMMDD')
)
select 'Source #' as stats_type, count(1) stats_count from ige_source_evw where trans_id_create in (select trans_id from cte)
union all
select 'Task #', count(1) from ige_task where trans_id_create in (select trans_id from cte)--where task_id > 60000013
union all
select 'transaction #', count(1) from ( select * from cte ) t
union all
select 'Control task #', count(1) from ige_control_task where trans_id_create in (select trans_id from cte)
union all
select 'AMA #', count(1) from authorized_municipal_address_evw where trans_id_create in (select trans_id from cte)
union all
select 'LFN #', count(1) from linear_name_evw where trans_id_create in (select trans_id from cte)
;
---- Summary report since June 8.
with cte as
(
select * from ige_transaction
where to_char(date_start, 'YYYYMMDD') between '20200608' and to_char(current_timestamp, 'YYYYMMDD')
)
select 'Source #' as stats_type, count(1) stats_count from ige_source_evw where trans_id_create in (select trans_id from cte)
union all
select 'Task #', count(1) from ige_task where trans_id_create in (select trans_id from cte)--where task_id > 60000013
union all
select 'transaction #', count(1) from ( select * from cte ) t
union all
select 'Control task #', count(1) from ige_control_task where trans_id_create in (select trans_id from cte)
union all
select 'AMA #', count(1) from authorized_municipal_address_evw where trans_id_create in (select trans_id from cte)
union all
select 'LFN #', count(1) from linear_name_evw where trans_id_create in (select trans_id from cte)
;
*/
----------------------------------------------------------------------------------------------------
--revoke network from aturvey;