activewarehouse 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +27 -14
- data/Rakefile +16 -5
- data/doc/references.txt +4 -0
- data/generators/bridge/templates/migration.rb +9 -2
- data/generators/bridge/templates/unit_test.rb +8 -0
- data/generators/date_dimension/USAGE +1 -0
- data/generators/date_dimension/date_dimension_generator.rb +16 -0
- data/generators/date_dimension/templates/fixture.yml +5 -0
- data/generators/date_dimension/templates/migration.rb +31 -0
- data/generators/date_dimension/templates/model.rb +3 -0
- data/generators/date_dimension/templates/unit_test.rb +8 -0
- data/generators/dimension/templates/migration.rb +1 -10
- data/generators/dimension_view/dimension_view_generator.rb +2 -2
- data/generators/dimension_view/templates/migration.rb +8 -2
- data/generators/fact/templates/migration.rb +2 -0
- data/generators/time_dimension/USAGE +1 -0
- data/generators/time_dimension/templates/fixture.yml +5 -0
- data/generators/time_dimension/templates/migration.rb +12 -0
- data/generators/time_dimension/templates/model.rb +3 -0
- data/generators/time_dimension/templates/unit_test.rb +8 -0
- data/generators/time_dimension/time_dimension_generator.rb +14 -0
- data/lib/active_warehouse.rb +13 -2
- data/lib/active_warehouse/aggregate.rb +54 -253
- data/lib/active_warehouse/aggregate/dwarf/node.rb +36 -0
- data/lib/active_warehouse/aggregate/dwarf_aggregate.rb +369 -0
- data/lib/active_warehouse/aggregate/dwarf_common.rb +44 -0
- data/lib/active_warehouse/aggregate/dwarf_printer.rb +34 -0
- data/lib/active_warehouse/aggregate/no_aggregate.rb +194 -0
- data/lib/active_warehouse/aggregate/pid_aggregate.rb +29 -0
- data/lib/active_warehouse/aggregate/pipelined_rolap_aggregate.rb +129 -0
- data/lib/active_warehouse/aggregate/rolap_aggregate.rb +181 -0
- data/lib/active_warehouse/aggregate/rolap_common.rb +89 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_1.sql +12 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_10.sql +7166 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_11.sql +14334 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_12.sql +28670 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_13.sql +57342 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_2.sql +26 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_3.sql +54 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_4.sql +110 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_5.sql +222 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_6.sql +446 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_7.sql +894 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_8.sql +1790 -0
- data/lib/active_warehouse/aggregate/templates/pipelined_rollup_9.sql +3582 -0
- data/lib/active_warehouse/aggregate_field.rb +49 -0
- data/lib/active_warehouse/{dimension/bridge.rb → bridge.rb} +7 -3
- data/lib/active_warehouse/bridge/hierarchy_bridge.rb +46 -0
- data/lib/active_warehouse/builder.rb +2 -1
- data/lib/active_warehouse/builder/date_dimension_builder.rb +5 -2
- data/lib/active_warehouse/builder/generator/generator.rb +13 -0
- data/lib/active_warehouse/builder/generator/name_generator.rb +20 -0
- data/lib/active_warehouse/builder/generator/paragraph_generator.rb +11 -0
- data/lib/active_warehouse/builder/random_data_builder.rb +21 -11
- data/lib/active_warehouse/builder/test_data_builder.rb +54 -0
- data/lib/active_warehouse/calculated_field.rb +27 -0
- data/lib/active_warehouse/compat/compat.rb +4 -4
- data/lib/active_warehouse/cube.rb +126 -225
- data/lib/active_warehouse/cube_query_result.rb +69 -0
- data/lib/active_warehouse/dimension.rb +64 -29
- data/lib/active_warehouse/dimension/date_dimension.rb +15 -0
- data/lib/active_warehouse/dimension/dimension_reflection.rb +21 -0
- data/lib/active_warehouse/dimension/dimension_view.rb +17 -2
- data/lib/active_warehouse/dimension/hierarchical_dimension.rb +43 -5
- data/lib/active_warehouse/dimension/slowly_changing_dimension.rb +22 -12
- data/lib/active_warehouse/fact.rb +119 -40
- data/lib/active_warehouse/field.rb +74 -0
- data/lib/active_warehouse/ordered_hash.rb +34 -0
- data/lib/active_warehouse/prejoin_fact.rb +97 -0
- data/lib/active_warehouse/report/abstract_report.rb +40 -14
- data/lib/active_warehouse/report/chart_report.rb +3 -3
- data/lib/active_warehouse/report/table_report.rb +8 -3
- data/lib/active_warehouse/version.rb +1 -1
- data/lib/active_warehouse/view/report_helper.rb +144 -34
- data/tasks/active_warehouse_tasks.rake +28 -10
- metadata +107 -30
@@ -0,0 +1,894 @@
|
|
1
|
+
INSERT INTO <%= @rollup_table_name %>_7
|
2
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
3
|
+
<%= @aggregate_fields_from_flat_table %>
|
4
|
+
FROM <%= @flat_table_name %>
|
5
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
6
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
7
|
+
|
8
|
+
INSERT INTO <%= @rollup_table_name %>_6
|
9
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
10
|
+
<%= @aggregate_fields %>
|
11
|
+
FROM <%= @rollup_table_name %>_7
|
12
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
13
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
14
|
+
|
15
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
16
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, null, null,
|
17
|
+
<%= @aggregate_fields %>
|
18
|
+
FROM <%= @rollup_table_name %>_6
|
19
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null
|
20
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>
|
21
|
+
|
22
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
23
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, null, null, null,
|
24
|
+
<%= @aggregate_fields %>
|
25
|
+
FROM <%= @rollup_table_name %>_5
|
26
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null
|
27
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>
|
28
|
+
|
29
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
30
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, null, null, null, null,
|
31
|
+
<%= @aggregate_fields %>
|
32
|
+
FROM <%= @rollup_table_name %>_4
|
33
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null
|
34
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>
|
35
|
+
|
36
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
37
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, null, null, null, null,
|
38
|
+
<%= @aggregate_fields %>
|
39
|
+
FROM <%= @rollup_table_name %>_3
|
40
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null
|
41
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>
|
42
|
+
|
43
|
+
INSERT INTO <%= @rollup_table_name %>_1
|
44
|
+
SELECT <%= @dimension_0 %>, null, null, null, null, null, null,
|
45
|
+
<%= @aggregate_fields %>
|
46
|
+
FROM <%= @rollup_table_name %>_2
|
47
|
+
WHERE <%= @dimension_0 %> is not null
|
48
|
+
GROUP BY <%= @dimension_0 %>
|
49
|
+
|
50
|
+
INSERT INTO <%= @rollup_table_name %>_0
|
51
|
+
SELECT null, null, null, null, null, null, null,
|
52
|
+
<%= @aggregate_fields %>
|
53
|
+
FROM <%= @rollup_table_name %>_1
|
54
|
+
|
55
|
+
INSERT INTO <%= @rollup_table_name %>_1
|
56
|
+
SELECT null, <%= @dimension_1 %>, null, null, null, null, null,
|
57
|
+
<%= @aggregate_fields %>
|
58
|
+
FROM <%= @rollup_table_name %>_2
|
59
|
+
WHERE <%= @dimension_1 %> is not null
|
60
|
+
GROUP BY <%= @dimension_1 %>
|
61
|
+
|
62
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
63
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, null, null, null, null,
|
64
|
+
<%= @aggregate_fields %>
|
65
|
+
FROM <%= @rollup_table_name %>_3
|
66
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null
|
67
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>
|
68
|
+
|
69
|
+
INSERT INTO <%= @rollup_table_name %>_1
|
70
|
+
SELECT null, null, <%= @dimension_2 %>, null, null, null, null,
|
71
|
+
<%= @aggregate_fields %>
|
72
|
+
FROM <%= @rollup_table_name %>_2
|
73
|
+
WHERE <%= @dimension_2 %> is not null
|
74
|
+
GROUP BY <%= @dimension_2 %>
|
75
|
+
|
76
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
77
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, null, null, null, null,
|
78
|
+
<%= @aggregate_fields %>
|
79
|
+
FROM <%= @rollup_table_name %>_3
|
80
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null
|
81
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>
|
82
|
+
|
83
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
84
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, <%= @dimension_3 %>, null, null, null,
|
85
|
+
<%= @aggregate_fields %>
|
86
|
+
FROM <%= @rollup_table_name %>_4
|
87
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null
|
88
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_3 %>
|
89
|
+
|
90
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
91
|
+
SELECT <%= @dimension_0 %>, null, null, <%= @dimension_3 %>, null, null, null,
|
92
|
+
<%= @aggregate_fields %>
|
93
|
+
FROM <%= @rollup_table_name %>_3
|
94
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_3 %> is not null
|
95
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_3 %>
|
96
|
+
|
97
|
+
INSERT INTO <%= @rollup_table_name %>_1
|
98
|
+
SELECT null, null, null, <%= @dimension_3 %>, null, null, null,
|
99
|
+
<%= @aggregate_fields %>
|
100
|
+
FROM <%= @rollup_table_name %>_2
|
101
|
+
WHERE <%= @dimension_3 %> is not null
|
102
|
+
GROUP BY <%= @dimension_3 %>
|
103
|
+
|
104
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
105
|
+
SELECT null, <%= @dimension_1 %>, null, <%= @dimension_3 %>, null, null, null,
|
106
|
+
<%= @aggregate_fields %>
|
107
|
+
FROM <%= @rollup_table_name %>_3
|
108
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null
|
109
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_3 %>
|
110
|
+
|
111
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
112
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, <%= @dimension_3 %>, null, null, null,
|
113
|
+
<%= @aggregate_fields %>
|
114
|
+
FROM <%= @rollup_table_name %>_4
|
115
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null
|
116
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_3 %>
|
117
|
+
|
118
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
119
|
+
SELECT null, null, <%= @dimension_2 %>, <%= @dimension_3 %>, null, null, null,
|
120
|
+
<%= @aggregate_fields %>
|
121
|
+
FROM <%= @rollup_table_name %>_3
|
122
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null
|
123
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_3 %>
|
124
|
+
|
125
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
126
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, null, null, null,
|
127
|
+
<%= @aggregate_fields %>
|
128
|
+
FROM <%= @rollup_table_name %>_4
|
129
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null
|
130
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>
|
131
|
+
|
132
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
133
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, null, <%= @dimension_4 %>, null, null,
|
134
|
+
<%= @aggregate_fields %>
|
135
|
+
FROM <%= @rollup_table_name %>_5
|
136
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null
|
137
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_4 %>
|
138
|
+
|
139
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
140
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, null, <%= @dimension_4 %>, null, null,
|
141
|
+
<%= @aggregate_fields %>
|
142
|
+
FROM <%= @rollup_table_name %>_4
|
143
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_4 %> is not null
|
144
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_4 %>
|
145
|
+
|
146
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
147
|
+
SELECT <%= @dimension_0 %>, null, null, null, <%= @dimension_4 %>, null, null,
|
148
|
+
<%= @aggregate_fields %>
|
149
|
+
FROM <%= @rollup_table_name %>_3
|
150
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_4 %> is not null
|
151
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_4 %>
|
152
|
+
|
153
|
+
INSERT INTO <%= @rollup_table_name %>_1
|
154
|
+
SELECT null, null, null, null, <%= @dimension_4 %>, null, null,
|
155
|
+
<%= @aggregate_fields %>
|
156
|
+
FROM <%= @rollup_table_name %>_2
|
157
|
+
WHERE <%= @dimension_4 %> is not null
|
158
|
+
GROUP BY <%= @dimension_4 %>
|
159
|
+
|
160
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
161
|
+
SELECT null, <%= @dimension_1 %>, null, null, <%= @dimension_4 %>, null, null,
|
162
|
+
<%= @aggregate_fields %>
|
163
|
+
FROM <%= @rollup_table_name %>_3
|
164
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_4 %> is not null
|
165
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_4 %>
|
166
|
+
|
167
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
168
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, null, <%= @dimension_4 %>, null, null,
|
169
|
+
<%= @aggregate_fields %>
|
170
|
+
FROM <%= @rollup_table_name %>_4
|
171
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null
|
172
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_4 %>
|
173
|
+
|
174
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
175
|
+
SELECT null, null, <%= @dimension_2 %>, null, <%= @dimension_4 %>, null, null,
|
176
|
+
<%= @aggregate_fields %>
|
177
|
+
FROM <%= @rollup_table_name %>_3
|
178
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null
|
179
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_4 %>
|
180
|
+
|
181
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
182
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, null, <%= @dimension_4 %>, null, null,
|
183
|
+
<%= @aggregate_fields %>
|
184
|
+
FROM <%= @rollup_table_name %>_4
|
185
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null
|
186
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_4 %>
|
187
|
+
|
188
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
189
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, <%= @dimension_3 %>, <%= @dimension_4 %>, null, null,
|
190
|
+
<%= @aggregate_fields %>
|
191
|
+
FROM <%= @rollup_table_name %>_5
|
192
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null
|
193
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_4 %>
|
194
|
+
|
195
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
196
|
+
SELECT <%= @dimension_0 %>, null, null, <%= @dimension_3 %>, <%= @dimension_4 %>, null, null,
|
197
|
+
<%= @aggregate_fields %>
|
198
|
+
FROM <%= @rollup_table_name %>_4
|
199
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null
|
200
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_3 %>, <%= @dimension_4 %>
|
201
|
+
|
202
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
203
|
+
SELECT null, null, null, <%= @dimension_3 %>, <%= @dimension_4 %>, null, null,
|
204
|
+
<%= @aggregate_fields %>
|
205
|
+
FROM <%= @rollup_table_name %>_3
|
206
|
+
WHERE <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null
|
207
|
+
GROUP BY <%= @dimension_3 %>, <%= @dimension_4 %>
|
208
|
+
|
209
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
210
|
+
SELECT null, <%= @dimension_1 %>, null, <%= @dimension_3 %>, <%= @dimension_4 %>, null, null,
|
211
|
+
<%= @aggregate_fields %>
|
212
|
+
FROM <%= @rollup_table_name %>_4
|
213
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null
|
214
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_4 %>
|
215
|
+
|
216
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
217
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, null, null,
|
218
|
+
<%= @aggregate_fields %>
|
219
|
+
FROM <%= @rollup_table_name %>_5
|
220
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null
|
221
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>
|
222
|
+
|
223
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
224
|
+
SELECT null, null, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, null, null,
|
225
|
+
<%= @aggregate_fields %>
|
226
|
+
FROM <%= @rollup_table_name %>_4
|
227
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null
|
228
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>
|
229
|
+
|
230
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
231
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, null, null,
|
232
|
+
<%= @aggregate_fields %>
|
233
|
+
FROM <%= @rollup_table_name %>_5
|
234
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null
|
235
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>
|
236
|
+
|
237
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
238
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, null, <%= @dimension_5 %>, null,
|
239
|
+
<%= @aggregate_fields %>
|
240
|
+
FROM <%= @rollup_table_name %>_6
|
241
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null
|
242
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_5 %>
|
243
|
+
|
244
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
245
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, null, null, <%= @dimension_5 %>, null,
|
246
|
+
<%= @aggregate_fields %>
|
247
|
+
FROM <%= @rollup_table_name %>_5
|
248
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_5 %> is not null
|
249
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_5 %>
|
250
|
+
|
251
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
252
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, null, null, <%= @dimension_5 %>, null,
|
253
|
+
<%= @aggregate_fields %>
|
254
|
+
FROM <%= @rollup_table_name %>_4
|
255
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_5 %> is not null
|
256
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_5 %>
|
257
|
+
|
258
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
259
|
+
SELECT <%= @dimension_0 %>, null, null, null, null, <%= @dimension_5 %>, null,
|
260
|
+
<%= @aggregate_fields %>
|
261
|
+
FROM <%= @rollup_table_name %>_3
|
262
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_5 %> is not null
|
263
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_5 %>
|
264
|
+
|
265
|
+
INSERT INTO <%= @rollup_table_name %>_1
|
266
|
+
SELECT null, null, null, null, null, <%= @dimension_5 %>, null,
|
267
|
+
<%= @aggregate_fields %>
|
268
|
+
FROM <%= @rollup_table_name %>_2
|
269
|
+
WHERE <%= @dimension_5 %> is not null
|
270
|
+
GROUP BY <%= @dimension_5 %>
|
271
|
+
|
272
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
273
|
+
SELECT null, <%= @dimension_1 %>, null, null, null, <%= @dimension_5 %>, null,
|
274
|
+
<%= @aggregate_fields %>
|
275
|
+
FROM <%= @rollup_table_name %>_3
|
276
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_5 %> is not null
|
277
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_5 %>
|
278
|
+
|
279
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
280
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, null, null, <%= @dimension_5 %>, null,
|
281
|
+
<%= @aggregate_fields %>
|
282
|
+
FROM <%= @rollup_table_name %>_4
|
283
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_5 %> is not null
|
284
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_5 %>
|
285
|
+
|
286
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
287
|
+
SELECT null, null, <%= @dimension_2 %>, null, null, <%= @dimension_5 %>, null,
|
288
|
+
<%= @aggregate_fields %>
|
289
|
+
FROM <%= @rollup_table_name %>_3
|
290
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_5 %> is not null
|
291
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_5 %>
|
292
|
+
|
293
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
294
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, null, null, <%= @dimension_5 %>, null,
|
295
|
+
<%= @aggregate_fields %>
|
296
|
+
FROM <%= @rollup_table_name %>_4
|
297
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_5 %> is not null
|
298
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_5 %>
|
299
|
+
|
300
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
301
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, <%= @dimension_3 %>, null, <%= @dimension_5 %>, null,
|
302
|
+
<%= @aggregate_fields %>
|
303
|
+
FROM <%= @rollup_table_name %>_5
|
304
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null
|
305
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_5 %>
|
306
|
+
|
307
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
308
|
+
SELECT <%= @dimension_0 %>, null, null, <%= @dimension_3 %>, null, <%= @dimension_5 %>, null,
|
309
|
+
<%= @aggregate_fields %>
|
310
|
+
FROM <%= @rollup_table_name %>_4
|
311
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null
|
312
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_3 %>, <%= @dimension_5 %>
|
313
|
+
|
314
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
315
|
+
SELECT null, null, null, <%= @dimension_3 %>, null, <%= @dimension_5 %>, null,
|
316
|
+
<%= @aggregate_fields %>
|
317
|
+
FROM <%= @rollup_table_name %>_3
|
318
|
+
WHERE <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null
|
319
|
+
GROUP BY <%= @dimension_3 %>, <%= @dimension_5 %>
|
320
|
+
|
321
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
322
|
+
SELECT null, <%= @dimension_1 %>, null, <%= @dimension_3 %>, null, <%= @dimension_5 %>, null,
|
323
|
+
<%= @aggregate_fields %>
|
324
|
+
FROM <%= @rollup_table_name %>_4
|
325
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null
|
326
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_5 %>
|
327
|
+
|
328
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
329
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, <%= @dimension_3 %>, null, <%= @dimension_5 %>, null,
|
330
|
+
<%= @aggregate_fields %>
|
331
|
+
FROM <%= @rollup_table_name %>_5
|
332
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null
|
333
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_5 %>
|
334
|
+
|
335
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
336
|
+
SELECT null, null, <%= @dimension_2 %>, <%= @dimension_3 %>, null, <%= @dimension_5 %>, null,
|
337
|
+
<%= @aggregate_fields %>
|
338
|
+
FROM <%= @rollup_table_name %>_4
|
339
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null
|
340
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_5 %>
|
341
|
+
|
342
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
343
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, null, <%= @dimension_5 %>, null,
|
344
|
+
<%= @aggregate_fields %>
|
345
|
+
FROM <%= @rollup_table_name %>_5
|
346
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null
|
347
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_5 %>
|
348
|
+
|
349
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
350
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, null, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
351
|
+
<%= @aggregate_fields %>
|
352
|
+
FROM <%= @rollup_table_name %>_6
|
353
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
354
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
355
|
+
|
356
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
357
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, null, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
358
|
+
<%= @aggregate_fields %>
|
359
|
+
FROM <%= @rollup_table_name %>_5
|
360
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
361
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
362
|
+
|
363
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
364
|
+
SELECT <%= @dimension_0 %>, null, null, null, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
365
|
+
<%= @aggregate_fields %>
|
366
|
+
FROM <%= @rollup_table_name %>_4
|
367
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
368
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
369
|
+
|
370
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
371
|
+
SELECT null, null, null, null, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
372
|
+
<%= @aggregate_fields %>
|
373
|
+
FROM <%= @rollup_table_name %>_3
|
374
|
+
WHERE <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
375
|
+
GROUP BY <%= @dimension_4 %>, <%= @dimension_5 %>
|
376
|
+
|
377
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
378
|
+
SELECT null, <%= @dimension_1 %>, null, null, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
379
|
+
<%= @aggregate_fields %>
|
380
|
+
FROM <%= @rollup_table_name %>_4
|
381
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
382
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
383
|
+
|
384
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
385
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, null, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
386
|
+
<%= @aggregate_fields %>
|
387
|
+
FROM <%= @rollup_table_name %>_5
|
388
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
389
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
390
|
+
|
391
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
392
|
+
SELECT null, null, <%= @dimension_2 %>, null, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
393
|
+
<%= @aggregate_fields %>
|
394
|
+
FROM <%= @rollup_table_name %>_4
|
395
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
396
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
397
|
+
|
398
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
399
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, null, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
400
|
+
<%= @aggregate_fields %>
|
401
|
+
FROM <%= @rollup_table_name %>_5
|
402
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
403
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
404
|
+
|
405
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
406
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
407
|
+
<%= @aggregate_fields %>
|
408
|
+
FROM <%= @rollup_table_name %>_6
|
409
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
410
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
411
|
+
|
412
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
413
|
+
SELECT <%= @dimension_0 %>, null, null, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
414
|
+
<%= @aggregate_fields %>
|
415
|
+
FROM <%= @rollup_table_name %>_5
|
416
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
417
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
418
|
+
|
419
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
420
|
+
SELECT null, null, null, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
421
|
+
<%= @aggregate_fields %>
|
422
|
+
FROM <%= @rollup_table_name %>_4
|
423
|
+
WHERE <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
424
|
+
GROUP BY <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
425
|
+
|
426
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
427
|
+
SELECT null, <%= @dimension_1 %>, null, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
428
|
+
<%= @aggregate_fields %>
|
429
|
+
FROM <%= @rollup_table_name %>_5
|
430
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
431
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
432
|
+
|
433
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
434
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
435
|
+
<%= @aggregate_fields %>
|
436
|
+
FROM <%= @rollup_table_name %>_6
|
437
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
438
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
439
|
+
|
440
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
441
|
+
SELECT null, null, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
442
|
+
<%= @aggregate_fields %>
|
443
|
+
FROM <%= @rollup_table_name %>_5
|
444
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
445
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
446
|
+
|
447
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
448
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, null,
|
449
|
+
<%= @aggregate_fields %>
|
450
|
+
FROM <%= @rollup_table_name %>_6
|
451
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null
|
452
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>
|
453
|
+
|
454
|
+
INSERT INTO <%= @rollup_table_name %>_6
|
455
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
456
|
+
<%= @aggregate_fields %>
|
457
|
+
FROM <%= @rollup_table_name %>_7
|
458
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
459
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
460
|
+
|
461
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
462
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, null, null, <%= @dimension_6 %>,
|
463
|
+
<%= @aggregate_fields %>
|
464
|
+
FROM <%= @rollup_table_name %>_6
|
465
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_6 %> is not null
|
466
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_6 %>
|
467
|
+
|
468
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
469
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, null, null, null, <%= @dimension_6 %>,
|
470
|
+
<%= @aggregate_fields %>
|
471
|
+
FROM <%= @rollup_table_name %>_5
|
472
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_6 %> is not null
|
473
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_6 %>
|
474
|
+
|
475
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
476
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, null, null, null, <%= @dimension_6 %>,
|
477
|
+
<%= @aggregate_fields %>
|
478
|
+
FROM <%= @rollup_table_name %>_4
|
479
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_6 %> is not null
|
480
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_6 %>
|
481
|
+
|
482
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
483
|
+
SELECT <%= @dimension_0 %>, null, null, null, null, null, <%= @dimension_6 %>,
|
484
|
+
<%= @aggregate_fields %>
|
485
|
+
FROM <%= @rollup_table_name %>_3
|
486
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_6 %> is not null
|
487
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_6 %>
|
488
|
+
|
489
|
+
INSERT INTO <%= @rollup_table_name %>_1
|
490
|
+
SELECT null, null, null, null, null, null, <%= @dimension_6 %>,
|
491
|
+
<%= @aggregate_fields %>
|
492
|
+
FROM <%= @rollup_table_name %>_2
|
493
|
+
WHERE <%= @dimension_6 %> is not null
|
494
|
+
GROUP BY <%= @dimension_6 %>
|
495
|
+
|
496
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
497
|
+
SELECT null, <%= @dimension_1 %>, null, null, null, null, <%= @dimension_6 %>,
|
498
|
+
<%= @aggregate_fields %>
|
499
|
+
FROM <%= @rollup_table_name %>_3
|
500
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_6 %> is not null
|
501
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_6 %>
|
502
|
+
|
503
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
504
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, null, null, null, <%= @dimension_6 %>,
|
505
|
+
<%= @aggregate_fields %>
|
506
|
+
FROM <%= @rollup_table_name %>_4
|
507
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_6 %> is not null
|
508
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_6 %>
|
509
|
+
|
510
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
511
|
+
SELECT null, null, <%= @dimension_2 %>, null, null, null, <%= @dimension_6 %>,
|
512
|
+
<%= @aggregate_fields %>
|
513
|
+
FROM <%= @rollup_table_name %>_3
|
514
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_6 %> is not null
|
515
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_6 %>
|
516
|
+
|
517
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
518
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, null, null, null, <%= @dimension_6 %>,
|
519
|
+
<%= @aggregate_fields %>
|
520
|
+
FROM <%= @rollup_table_name %>_4
|
521
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_6 %> is not null
|
522
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_6 %>
|
523
|
+
|
524
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
525
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, <%= @dimension_3 %>, null, null, <%= @dimension_6 %>,
|
526
|
+
<%= @aggregate_fields %>
|
527
|
+
FROM <%= @rollup_table_name %>_5
|
528
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_6 %> is not null
|
529
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_6 %>
|
530
|
+
|
531
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
532
|
+
SELECT <%= @dimension_0 %>, null, null, <%= @dimension_3 %>, null, null, <%= @dimension_6 %>,
|
533
|
+
<%= @aggregate_fields %>
|
534
|
+
FROM <%= @rollup_table_name %>_4
|
535
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_6 %> is not null
|
536
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_3 %>, <%= @dimension_6 %>
|
537
|
+
|
538
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
539
|
+
SELECT null, null, null, <%= @dimension_3 %>, null, null, <%= @dimension_6 %>,
|
540
|
+
<%= @aggregate_fields %>
|
541
|
+
FROM <%= @rollup_table_name %>_3
|
542
|
+
WHERE <%= @dimension_3 %> is not null and <%= @dimension_6 %> is not null
|
543
|
+
GROUP BY <%= @dimension_3 %>, <%= @dimension_6 %>
|
544
|
+
|
545
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
546
|
+
SELECT null, <%= @dimension_1 %>, null, <%= @dimension_3 %>, null, null, <%= @dimension_6 %>,
|
547
|
+
<%= @aggregate_fields %>
|
548
|
+
FROM <%= @rollup_table_name %>_4
|
549
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_6 %> is not null
|
550
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_6 %>
|
551
|
+
|
552
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
553
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, <%= @dimension_3 %>, null, null, <%= @dimension_6 %>,
|
554
|
+
<%= @aggregate_fields %>
|
555
|
+
FROM <%= @rollup_table_name %>_5
|
556
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_6 %> is not null
|
557
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_6 %>
|
558
|
+
|
559
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
560
|
+
SELECT null, null, <%= @dimension_2 %>, <%= @dimension_3 %>, null, null, <%= @dimension_6 %>,
|
561
|
+
<%= @aggregate_fields %>
|
562
|
+
FROM <%= @rollup_table_name %>_4
|
563
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_6 %> is not null
|
564
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_6 %>
|
565
|
+
|
566
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
567
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, null, null, <%= @dimension_6 %>,
|
568
|
+
<%= @aggregate_fields %>
|
569
|
+
FROM <%= @rollup_table_name %>_5
|
570
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_6 %> is not null
|
571
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_6 %>
|
572
|
+
|
573
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
574
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, null, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
575
|
+
<%= @aggregate_fields %>
|
576
|
+
FROM <%= @rollup_table_name %>_6
|
577
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
578
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
579
|
+
|
580
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
581
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, null, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
582
|
+
<%= @aggregate_fields %>
|
583
|
+
FROM <%= @rollup_table_name %>_5
|
584
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
585
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
586
|
+
|
587
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
588
|
+
SELECT <%= @dimension_0 %>, null, null, null, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
589
|
+
<%= @aggregate_fields %>
|
590
|
+
FROM <%= @rollup_table_name %>_4
|
591
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
592
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
593
|
+
|
594
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
595
|
+
SELECT null, null, null, null, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
596
|
+
<%= @aggregate_fields %>
|
597
|
+
FROM <%= @rollup_table_name %>_3
|
598
|
+
WHERE <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
599
|
+
GROUP BY <%= @dimension_4 %>, <%= @dimension_6 %>
|
600
|
+
|
601
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
602
|
+
SELECT null, <%= @dimension_1 %>, null, null, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
603
|
+
<%= @aggregate_fields %>
|
604
|
+
FROM <%= @rollup_table_name %>_4
|
605
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
606
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
607
|
+
|
608
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
609
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, null, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
610
|
+
<%= @aggregate_fields %>
|
611
|
+
FROM <%= @rollup_table_name %>_5
|
612
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
613
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
614
|
+
|
615
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
616
|
+
SELECT null, null, <%= @dimension_2 %>, null, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
617
|
+
<%= @aggregate_fields %>
|
618
|
+
FROM <%= @rollup_table_name %>_4
|
619
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
620
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
621
|
+
|
622
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
623
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, null, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
624
|
+
<%= @aggregate_fields %>
|
625
|
+
FROM <%= @rollup_table_name %>_5
|
626
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
627
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
628
|
+
|
629
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
630
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, <%= @dimension_3 %>, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
631
|
+
<%= @aggregate_fields %>
|
632
|
+
FROM <%= @rollup_table_name %>_6
|
633
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
634
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
635
|
+
|
636
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
637
|
+
SELECT <%= @dimension_0 %>, null, null, <%= @dimension_3 %>, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
638
|
+
<%= @aggregate_fields %>
|
639
|
+
FROM <%= @rollup_table_name %>_5
|
640
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
641
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
642
|
+
|
643
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
644
|
+
SELECT null, null, null, <%= @dimension_3 %>, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
645
|
+
<%= @aggregate_fields %>
|
646
|
+
FROM <%= @rollup_table_name %>_4
|
647
|
+
WHERE <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
648
|
+
GROUP BY <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
649
|
+
|
650
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
651
|
+
SELECT null, <%= @dimension_1 %>, null, <%= @dimension_3 %>, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
652
|
+
<%= @aggregate_fields %>
|
653
|
+
FROM <%= @rollup_table_name %>_5
|
654
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
655
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
656
|
+
|
657
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
658
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
659
|
+
<%= @aggregate_fields %>
|
660
|
+
FROM <%= @rollup_table_name %>_6
|
661
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
662
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
663
|
+
|
664
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
665
|
+
SELECT null, null, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
666
|
+
<%= @aggregate_fields %>
|
667
|
+
FROM <%= @rollup_table_name %>_5
|
668
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
669
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
670
|
+
|
671
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
672
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, null, <%= @dimension_6 %>,
|
673
|
+
<%= @aggregate_fields %>
|
674
|
+
FROM <%= @rollup_table_name %>_6
|
675
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_6 %> is not null
|
676
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_6 %>
|
677
|
+
|
678
|
+
INSERT INTO <%= @rollup_table_name %>_6
|
679
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
680
|
+
<%= @aggregate_fields %>
|
681
|
+
FROM <%= @rollup_table_name %>_7
|
682
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
683
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
684
|
+
|
685
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
686
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, null, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
687
|
+
<%= @aggregate_fields %>
|
688
|
+
FROM <%= @rollup_table_name %>_6
|
689
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
690
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
691
|
+
|
692
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
693
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, null, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
694
|
+
<%= @aggregate_fields %>
|
695
|
+
FROM <%= @rollup_table_name %>_5
|
696
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
697
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
698
|
+
|
699
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
700
|
+
SELECT <%= @dimension_0 %>, null, null, null, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
701
|
+
<%= @aggregate_fields %>
|
702
|
+
FROM <%= @rollup_table_name %>_4
|
703
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
704
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
705
|
+
|
706
|
+
INSERT INTO <%= @rollup_table_name %>_2
|
707
|
+
SELECT null, null, null, null, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
708
|
+
<%= @aggregate_fields %>
|
709
|
+
FROM <%= @rollup_table_name %>_3
|
710
|
+
WHERE <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
711
|
+
GROUP BY <%= @dimension_5 %>, <%= @dimension_6 %>
|
712
|
+
|
713
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
714
|
+
SELECT null, <%= @dimension_1 %>, null, null, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
715
|
+
<%= @aggregate_fields %>
|
716
|
+
FROM <%= @rollup_table_name %>_4
|
717
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
718
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
719
|
+
|
720
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
721
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, null, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
722
|
+
<%= @aggregate_fields %>
|
723
|
+
FROM <%= @rollup_table_name %>_5
|
724
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
725
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
726
|
+
|
727
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
728
|
+
SELECT null, null, <%= @dimension_2 %>, null, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
729
|
+
<%= @aggregate_fields %>
|
730
|
+
FROM <%= @rollup_table_name %>_4
|
731
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
732
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
733
|
+
|
734
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
735
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, null, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
736
|
+
<%= @aggregate_fields %>
|
737
|
+
FROM <%= @rollup_table_name %>_5
|
738
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
739
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
740
|
+
|
741
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
742
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, <%= @dimension_3 %>, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
743
|
+
<%= @aggregate_fields %>
|
744
|
+
FROM <%= @rollup_table_name %>_6
|
745
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
746
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
747
|
+
|
748
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
749
|
+
SELECT <%= @dimension_0 %>, null, null, <%= @dimension_3 %>, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
750
|
+
<%= @aggregate_fields %>
|
751
|
+
FROM <%= @rollup_table_name %>_5
|
752
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
753
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_3 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
754
|
+
|
755
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
756
|
+
SELECT null, null, null, <%= @dimension_3 %>, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
757
|
+
<%= @aggregate_fields %>
|
758
|
+
FROM <%= @rollup_table_name %>_4
|
759
|
+
WHERE <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
760
|
+
GROUP BY <%= @dimension_3 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
761
|
+
|
762
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
763
|
+
SELECT null, <%= @dimension_1 %>, null, <%= @dimension_3 %>, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
764
|
+
<%= @aggregate_fields %>
|
765
|
+
FROM <%= @rollup_table_name %>_5
|
766
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
767
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
768
|
+
|
769
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
770
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, <%= @dimension_3 %>, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
771
|
+
<%= @aggregate_fields %>
|
772
|
+
FROM <%= @rollup_table_name %>_6
|
773
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
774
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
775
|
+
|
776
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
777
|
+
SELECT null, null, <%= @dimension_2 %>, <%= @dimension_3 %>, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
778
|
+
<%= @aggregate_fields %>
|
779
|
+
FROM <%= @rollup_table_name %>_5
|
780
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
781
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
782
|
+
|
783
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
784
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, null, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
785
|
+
<%= @aggregate_fields %>
|
786
|
+
FROM <%= @rollup_table_name %>_6
|
787
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
788
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
789
|
+
|
790
|
+
INSERT INTO <%= @rollup_table_name %>_6
|
791
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, null, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
792
|
+
<%= @aggregate_fields %>
|
793
|
+
FROM <%= @rollup_table_name %>_7
|
794
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
795
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
796
|
+
|
797
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
798
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, null, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
799
|
+
<%= @aggregate_fields %>
|
800
|
+
FROM <%= @rollup_table_name %>_6
|
801
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
802
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
803
|
+
|
804
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
805
|
+
SELECT <%= @dimension_0 %>, null, null, null, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
806
|
+
<%= @aggregate_fields %>
|
807
|
+
FROM <%= @rollup_table_name %>_5
|
808
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
809
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
810
|
+
|
811
|
+
INSERT INTO <%= @rollup_table_name %>_3
|
812
|
+
SELECT null, null, null, null, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
813
|
+
<%= @aggregate_fields %>
|
814
|
+
FROM <%= @rollup_table_name %>_4
|
815
|
+
WHERE <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
816
|
+
GROUP BY <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
817
|
+
|
818
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
819
|
+
SELECT null, <%= @dimension_1 %>, null, null, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
820
|
+
<%= @aggregate_fields %>
|
821
|
+
FROM <%= @rollup_table_name %>_5
|
822
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
823
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
824
|
+
|
825
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
826
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, null, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
827
|
+
<%= @aggregate_fields %>
|
828
|
+
FROM <%= @rollup_table_name %>_6
|
829
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
830
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
831
|
+
|
832
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
833
|
+
SELECT null, null, <%= @dimension_2 %>, null, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
834
|
+
<%= @aggregate_fields %>
|
835
|
+
FROM <%= @rollup_table_name %>_5
|
836
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
837
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
838
|
+
|
839
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
840
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, null, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
841
|
+
<%= @aggregate_fields %>
|
842
|
+
FROM <%= @rollup_table_name %>_6
|
843
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
844
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
845
|
+
|
846
|
+
INSERT INTO <%= @rollup_table_name %>_6
|
847
|
+
SELECT <%= @dimension_0 %>, <%= @dimension_1 %>, null, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
848
|
+
<%= @aggregate_fields %>
|
849
|
+
FROM <%= @rollup_table_name %>_7
|
850
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
851
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
852
|
+
|
853
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
854
|
+
SELECT <%= @dimension_0 %>, null, null, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
855
|
+
<%= @aggregate_fields %>
|
856
|
+
FROM <%= @rollup_table_name %>_6
|
857
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
858
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
859
|
+
|
860
|
+
INSERT INTO <%= @rollup_table_name %>_4
|
861
|
+
SELECT null, null, null, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
862
|
+
<%= @aggregate_fields %>
|
863
|
+
FROM <%= @rollup_table_name %>_5
|
864
|
+
WHERE <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
865
|
+
GROUP BY <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
866
|
+
|
867
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
868
|
+
SELECT null, <%= @dimension_1 %>, null, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
869
|
+
<%= @aggregate_fields %>
|
870
|
+
FROM <%= @rollup_table_name %>_6
|
871
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
872
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
873
|
+
|
874
|
+
INSERT INTO <%= @rollup_table_name %>_6
|
875
|
+
SELECT <%= @dimension_0 %>, null, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
876
|
+
<%= @aggregate_fields %>
|
877
|
+
FROM <%= @rollup_table_name %>_7
|
878
|
+
WHERE <%= @dimension_0 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
879
|
+
GROUP BY <%= @dimension_0 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
880
|
+
|
881
|
+
INSERT INTO <%= @rollup_table_name %>_5
|
882
|
+
SELECT null, null, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
883
|
+
<%= @aggregate_fields %>
|
884
|
+
FROM <%= @rollup_table_name %>_6
|
885
|
+
WHERE <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
886
|
+
GROUP BY <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
887
|
+
|
888
|
+
INSERT INTO <%= @rollup_table_name %>_6
|
889
|
+
SELECT null, <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>,
|
890
|
+
<%= @aggregate_fields %>
|
891
|
+
FROM <%= @rollup_table_name %>_7
|
892
|
+
WHERE <%= @dimension_1 %> is not null and <%= @dimension_2 %> is not null and <%= @dimension_3 %> is not null and <%= @dimension_4 %> is not null and <%= @dimension_5 %> is not null and <%= @dimension_6 %> is not null
|
893
|
+
GROUP BY <%= @dimension_1 %>, <%= @dimension_2 %>, <%= @dimension_3 %>, <%= @dimension_4 %>, <%= @dimension_5 %>, <%= @dimension_6 %>
|
894
|
+
|