LED Full Example #1
This is a full example of one query submitted to LED. It is the same query that is in #3994.
This example gives the output of the code at https://gist.github.com/yoid2000/ba437fd39965e7f0cddc2aa077e80891 and https://gist.github.com/yoid2000/11f22aca0bf91edb27eb0146c6606163. This is the code I used to test #3994.
The analyst query in this example is:
SELECT frequency AS c1,
sum(amount) AS agg1
FROM transactions
WHERE (birth_number = '535812')
OR (acct_district_id = 2
AND (birth_number <> '333333')
AND (bank <> 'CD'))
GROUP BY 1
My code runs both the left and right queries of an attack pair and checks to make sure that the resulting answers are identical (within machine representation error). The output has the results of both left and right queries, though for this walk-through we are only interested in the left query (the one with the nodes---the right query drops one or more nodes).
The full results are at the bottom of this file. I'll take snippets from the results for the walk-through.
Probe 1 for the above query is as follows:
257 'sql': 'SELECT frequency AS c1,\n'
258 ' count(DISTINCT p1_uid) AS p1_full_cnt,\n'
259 ' min(p1_uid) AS p1_full_min,\n'
260 ' max(p1_uid) AS p1_full_max,\n'
261 ' count(DISTINCT p2n1_uid) AS p2n1_full_cnt,\n'
262 ' min(p2n1_uid) AS p2n1_full_min,\n'
263 ' max(p2n1_uid) AS p2n1_full_max,\n'
264 ' count(DISTINCT p2n1_dup) AS p2n1_part_cnt,\n'
265 ' min(p2n1_uid) AS p2n1_part_min,\n'
266 ' max(p2n1_uid) AS p2n1_part_max,\n'
267 ' count(DISTINCT p2n2_uid) AS p2n2_full_cnt,\n'
268 ' min(p2n2_uid) AS p2n2_full_min,\n'
269 ' max(p2n2_uid) AS p2n2_full_max,\n'
270 ' count(DISTINCT p2n2_dup) AS p2n2_part_cnt,\n'
271 ' min(p2n2_uid) AS p2n2_part_min,\n'
272 ' max(p2n2_uid) AS p2n2_part_max,\n'
273 ' count(DISTINCT p2_uid) AS p2_full_cnt,\n'
274 ' min(p2_uid) AS p2_full_min,\n'
275 ' max(p2_uid) AS p2_full_max\n'
276 'FROM\n'
277 ' (SELECT frequency,\n'
278 ' uid,\n'
279 ' CASE\n'
280 " WHEN birth_number = '535812' THEN uid\n"
281 ' ELSE NULL\n'
282 ' END AS p1_uid,\n'
283 ' CASE\n'
284 ' WHEN acct_district_id = 2\n'
285 " AND birth_number = '333333'\n"
286 " AND bank <> 'CD' THEN uid\n"
287 ' ELSE NULL\n'
288 ' END AS p2n1_uid,\n'
289 ' CASE\n'
290 ' WHEN acct_district_id = 2\n'
291 " AND birth_number = '333333' THEN uid\n"
292 ' ELSE NULL\n'
293 ' END AS p2n1_dup,\n'
294 ' CASE\n'
295 ' WHEN acct_district_id = 2\n'
296 " AND birth_number <> '333333'\n"
297 " AND bank = 'CD' THEN uid\n"
298 ' ELSE NULL\n'
299 ' END AS p2n2_uid,\n'
300 ' CASE\n'
301 ' WHEN acct_district_id = 2\n'
302 " AND bank = 'CD' THEN uid\n"
303 ' ELSE NULL\n'
304 ' END AS p2n2_dup,\n'
305 ' CASE\n'
306 ' WHEN acct_district_id = 2\n'
307 " AND birth_number <> '333333'\n"
308 " AND bank <> 'CD' THEN uid\n"
309 ' ELSE NULL\n'
310 ' END AS p2_uid\n'
311 ' FROM\n'
312 ' (SELECT frequency,\n'
313 ' uid,\n'
314 ' amount,\n'
315 ' birth_number,\n'
316 ' acct_district_id,\n'
317 ' bank\n'
318 ' FROM transactions\n'
319 " WHERE (birth_number = '535812')\n"
320 ' OR (acct_district_id = 2) ) t) t\n'
321 'GROUP BY 1\n'
322 'HAVING count(DISTINCT p1_uid) < 7\n'
323 'OR count(DISTINCT p2_uid) < 7\n'
324 'OR count(DISTINCT p2n1_uid) < 7\n'
325 'OR count(DISTINCT p2n2_uid) < 7'},
This was explained in #3994 so I won't go into it here.
The answer to probe 1 is:
199 'probe1': {'ans': [('POPLATEK MESICNE', 1, 13998, 13998, 0, None, None, 0, None, None, 4, 1031, 13090, 4,
200 1031, 13090, 40, 110, 13090),
201 ('POPLATEK PO OBRATU', 0, None, None, 0, None, None, 0, None, None, 0, None, None, 0, None,
202 None, 2, 150, 10639),
203 ('POPLATEK TYDNE', 0, None, None, 0, None, None, 0, None, None, 0, None, None, 0, None,
204 None, 4, 2759, 4479)],
205 'cols': ['c1', 'p1_full_cnt', 'p1_full_min', 'p1_full_max', 'p2n1_full_cnt', 'p2n1_full_min',
206 'p2n1_full_max', 'p2n1_part_cnt', 'p2n1_part_min', 'p2n1_part_max', 'p2n2_full_cnt',
207 'p2n2_full_min', 'p2n2_full_max', 'p2n2_part_cnt', 'p2n2_part_min', 'p2n2_part_max',
208 'p2_full_cnt', 'p2_full_min', 'p2_full_max'],
The 'ans' entry is the answer itself (three rows), and the 'cols' entry are the column names. You can see that there are three buckets, one forr each of the three frequency
values (column name c1
).
In my code (routine parseNode() at line 153 of https://gist.github.com/yoid2000/ba437fd39965e7f0cddc2aa077e80891) I use knowledge of the WHERE
condition structure to generate the following parsed structure:
209 'parsed': {'POPLATEK MESICNE': {'p1': {'full_cnt': 1, 'full_max': 13998, 'full_min': 13998},
210 'p2': {'full_cnt': 40,
211 'full_max': 13090,
212 'full_min': 110,
213 'negands': {'n1': {'full_cnt': 0,
214 'full_max': None,
215 'full_min': None,
216 'part_cnt': 0,
217 'part_max': None,
218 'part_min': None},
219 'n2': {'full_cnt': 4,
220 'full_max': 13090,
221 'full_min': 1031,
222 'part_cnt': 4,
223 'part_max': 13090,
224 'part_min': 1031}}}},
225 'POPLATEK PO OBRATU': {'p1': {'full_cnt': 0, 'full_max': None, 'full_min': None},
226 'p2': {'full_cnt': 2,
227 'full_max': 10639,
228 'full_min': 150,
229 'negands': {'n1': {'full_cnt': 0,
230 'full_max': None,
231 'full_min': None,
232 'part_cnt': 0,
233 'part_max': None,
234 'part_min': None},
235 'n2': {'full_cnt': 0,
236 'full_max': None,
237 'full_min': None,
238 'part_cnt': 0,
239 'part_max': None,
240 'part_min': None}}}},
241 'POPLATEK TYDNE': {'p1': {'full_cnt': 0, 'full_max': None, 'full_min': None},
242 'p2': {'full_cnt': 4,
243 'full_max': 4479,
244 'full_min': 2759,
245 'negands': {'n1': {'full_cnt': 0,
246 'full_max': None,
247 'full_min': None,
248 'part_cnt': 0,
249 'part_max': None,
250 'part_min': None},
251 'n2': {'full_cnt': 0,
252 'full_max': None,
253 'full_min': None,
254 'part_cnt': 0,
255 'part_max': None,
256 'part_min': None}}}}},
This structure lays out the UID signatures (cnt,min,max) for each bucket/node.
To take an example, the UID count for posor p1 of MESICNE is full_cnt=1
(line 209). That means that posor p1 is definately LE and will have to be checked in a second probe.
By contrast, the UID count for posor p2 of MESICNE is full_cnt=40
(line 210). It is definately not LE and won't need to be checked.
Negand p2n1 for MESICNE has full_cnt=0
(line 213), so it is LE. We need to check if it is a duplicate (routine checkForDuplicateNegands()
). Since p2n1 has no min or max UID (they are both NULL
(lines 214 and 215), it is either not a duplicate, or it is not a duplicate that we care about since it has no effect even in a partial-context (i.e. without taking its duplicate into account).
By contrast, negand p2n2 for MESICNE has full_cnt=4
(line 219). Thus it needs to be checked against a noisy threshold (routine getNoisyThreshold()
). In this particular case, it is LE, and so will need to be checked in probe2.
The result of all the above checks is the data structure spec2
at lines 378-452. It tags each bucket/node as having an effect
of LE0
(LE with zero effect), LE
(LE with non-zero effect, or a duplicate), or None
(not LE). From this we can see that p1 and p2n2 of MESICNE are LE, and p2 of OBRATU, are LE.
This results in the following probe2:
334 'sql': 'SELECT frequency AS c1,\n'
335 ' uid,\n'
336 ' sum(p1_agg) AS p1_adj1,\n'
337 ' sum(p2n1_agg) AS p2n1_adj1,\n'
338 ' sum(p2n2_agg) AS p2n2_adj1,\n'
339 ' sum(p2_agg) AS p2_adj1\n'
340 'FROM\n'
341 ' (SELECT frequency,\n'
342 ' uid,\n'
343 ' CASE\n'
344 " WHEN birth_number = '535812' THEN amount\n"
345 ' ELSE NULL\n'
346 ' END AS p1_agg,\n'
347 ' CASE\n'
348 ' WHEN acct_district_id = 2\n'
349 " AND birth_number = '333333' THEN amount\n"
350 ' ELSE NULL\n'
351 ' END AS p2n1_agg,\n'
352 ' CASE\n'
353 ' WHEN acct_district_id = 2\n'
354 " AND bank = 'CD' THEN amount\n"
355 ' ELSE NULL\n'
356 ' END AS p2n2_agg,\n'
357 ' CASE\n'
358 ' WHEN acct_district_id = 2 THEN amount\n'
359 ' ELSE NULL\n'
360 ' END AS p2_agg\n'
361 ' FROM\n'
362 ' (SELECT frequency,\n'
363 ' uid,\n'
364 ' amount,\n'
365 ' birth_number,\n'
366 ' acct_district_id,\n'
367 ' bank\n'
368 ' FROM transactions\n'
369 " WHERE (frequency IN ('POPLATEK MESICNE')\n"
370 " AND birth_number = '535812')\n"
371 " OR (frequency IN ('POPLATEK PO OBRATU')\n"
372 ' AND acct_district_id = 2)\n'
373 " OR (frequency IN ('POPLATEK MESICNE')\n"
374 ' AND acct_district_id = 2\n'
375 " AND bank = 'CD') ) t) t\n"
376 'GROUP BY 1,\n'
377 ' 2'},
This has also already been explained in #3994. The answer to probe2 is:
326 'probe2': {'ans': [('POPLATEK MESICNE', 1031, None, None, 3973.0, 3973.0),
327 ('POPLATEK MESICNE', 3100, None, None, 365688.0, 365688.0),
328 ('POPLATEK MESICNE', 3269, None, None, 43318.0, 43318.0),
329 ('POPLATEK MESICNE', 13090, None, None, 1280760.0, 1280760.0),
330 ('POPLATEK MESICNE', 13998, 2623161.9, None, None, None),
331 ('POPLATEK PO OBRATU', 150, None, None, None, 1902746.4),
332 ('POPLATEK PO OBRATU', 10639, None, None, None, 1530267.7)],
333 'cols': ['c1', 'uid', 'p1_adj1', 'p2n1_adj1', 'p2n2_adj1', 'p2_adj1'],
The first column c1
is the bucket value, and the second column uid
is the UID. You can see that there is one line per bucket/uid. (In this case, no UID appears in more than one bucket, but in principle one could.) The next four columns represent the contribution of the UID to each of the four nodes, p1, p2n1, p2n2, and p2.
The routine doAdjust()
determines what adjustment is needed for each bucket/UID.
Walking through the logic for UID 1031 for MESICNE, we see that it is affected by negand p2n2 and posor p2 (both in partial context). p2n2 is LE, and p2 is not. We want to determine the extent to which 1031 contributes for two cases, the case where all nodes are active (native case), and the case where only the non-LE nodes are active (non-LE case, to mimic dropping the LE nodes).
For the native case, we see that while p2 (partial context) includes 1031, p2n2 excludes it, and so for p2 1031 is excluded. It is also not included by by posor p1. Therefore 1031 is excluded in the native case and contributes nothing to the all-nodes case.
For the non-LE case, we see that p2 includes 1031. Since p2n2 is LE, it doesn't affect 1031 here. Therefore 1031 is included and contributes 3973.0 to sum(amount)
.
Since we want to mimic the non-LE case, we need to adjust MESICNE upwards for 1031. This means we need to add 1 to the UID count, and add 3973.0 to the sum(amount)
aggregate. Since we are adding 1031, we need to check to see if this affects the min or max UID.
The answer to the normal cloak query is this:
70 'cloak': {'ans': [('POPLATEK MESICNE', 110, 13998, 41, 56048551.6),
71 ('POPLATEK PO OBRATU', 150, 10639, 2, 3433014.1),
72 ('POPLATEK TYDNE', 2759, 4479, 4, 10067937.3)],
73 'cols': ['c1', 'min_uid', 'max_uid', 'cnt_uid', 'agg1'],
Here we see that for MESICNE, the pre-adjusted min UID is min_uid=110
, and max UID is max_uid=13998
. Since 1031 would not change either the min UID or the max UID, no adjust is needed to these values on account of 1031.
Now let's look at UID 13998 for MESICNE. For the native case (all nodes active), 13998 is included by posor p1, so it contributes to the native answer. Since posor p1 is LE, and since 13998 is not included in any other non-LE posors, it is overall excluded in the non-LE case. As a result, we need to adjust downwards for UID 13998. This means decrementing the UID count by 1, and subtracting 2623161.9 from sum(amount)
.
In addition, 13998 happens to be the maximum UID in the cloak answer for MESICNE. This means that we need to change it to the next highest UID. The list of UIDs that remains after doAdjust()
is:
195 'uidList': {'POPLATEK MESICNE': [110, 13090, 1031, 3100, 3269, 13090], 196 'POPLATEK PO OBRATU': [], 197 'POPLATEK TYDNE': [4479, 2759]}},
The max from this list is 13090, so this becomes the new max in the adjusted answer.
Taking into account all of the UIDs in the answer to probe2, the adjusted answer is this:
56 'left': {'adjustedAns': [['POPLATEK MESICNE', 110, 13090, 44, 55119128.7],
57 ['POPLATEK PO OBRATU', 10639, 10639, 0, 2.3283064365386963e-10],
58 ['POPLATEK TYDNE', 2759, 4479, 4, 10067937.3]],
We see that for MESICNE, the UID count went from 41 to 44, representing adding 4 UIDs and removing 1. The sum(amount)
went from 56048551.6 to 55119128.7 (it became lower because the contribution for the removed UID is more than the total contributions of the added UIDs).
1 {'comments': 'one LE negand, type ine3, attack out\n'
2 'Select type is sum\n'
3 'Left\n'
4 'negand dups for POPLATEK MESICNE, p2 is []\n'
5 'negand dups for POPLATEK PO OBRATU, p2 is []\n'
6 'negand dups for POPLATEK TYDNE, p2 is []\n'
7 ' There are one or more potential LE buckets\n'
8 'Right\n'
9 'negand dups for POPLATEK MESICNE, p2 is []\n'
10 'negand dups for POPLATEK PO OBRATU, p2 is []\n'
11 'negand dups for POPLATEK TYDNE, p2 is []\n'
12 ' There are one or more potential LE buckets\n'
13 'Left\n'
14 ' adjust up: POPLATEK MESICNE, 1031: 3973.0, 1\n'
15 ' POPLATEK MESICNE add uid 1031\n'
16 ' adjust up: POPLATEK MESICNE, 3100: 365688.0, 1\n'
17 ' POPLATEK MESICNE add uid 3100\n'
18 ' adjust up: POPLATEK MESICNE, 3269: 43318.0, 1\n'
19 ' POPLATEK MESICNE add uid 3269\n'
20 ' adjust up: POPLATEK MESICNE, 13090: 1280760.0, 1\n'
21 ' POPLATEK MESICNE add uid 13090\n'
22 ' adjust down: POPLATEK MESICNE, 13998: 2623161.9, 1\n'
23 ' POPLATEK MESICNE remove uid 13998\n'
24 ' POPLATEK MESICNE Replace max uid 13998 with 13090\n'
25 ' adjust down: POPLATEK PO OBRATU, 150: 1902746.4, 1\n'
26 ' POPLATEK PO OBRATU remove uid 150\n'
27 ' POPLATEK PO OBRATU Replace min uid 150 with 10639\n'
28 ' adjust down: POPLATEK PO OBRATU, 10639: 1530267.7, 1\n'
29 ' POPLATEK PO OBRATU remove uid 10639\n'
30 ' POPLATEK PO OBRATU uidList empty\n'
31 'Right\n'
32 ' adjust up: POPLATEK MESICNE, 1031: 3973.0, 1\n'
33 ' POPLATEK MESICNE add uid 1031\n'
34 ' adjust up: POPLATEK MESICNE, 3100: 365688.0, 1\n'
35 ' POPLATEK MESICNE add uid 3100\n'
36 ' adjust up: POPLATEK MESICNE, 3269: 43318.0, 1\n'
37 ' POPLATEK MESICNE add uid 3269\n'
38 ' adjust up: POPLATEK MESICNE, 13090: 1280760.0, 1\n'
39 ' POPLATEK MESICNE add uid 13090\n'
40 ' adjust down: POPLATEK MESICNE, 13998: 2623161.9, 1\n'
41 ' POPLATEK MESICNE remove uid 13998\n'
42 ' POPLATEK MESICNE Replace max uid 13998 with 13090\n'
43 ' adjust down: POPLATEK PO OBRATU, 150: 1902746.4, 1\n'
44 ' POPLATEK PO OBRATU remove uid 150\n'
45 ' POPLATEK PO OBRATU Replace min uid 150 with 10639\n'
46 ' adjust down: POPLATEK PO OBRATU, 10639: 1530267.7, 1\n'
47 ' POPLATEK PO OBRATU remove uid 10639\n'
48 ' POPLATEK PO OBRATU uidList empty\n'
49 'PASS left/right compare\n',
50 'initSpec': [{'attack': 'in', 'drop': False, 'index': 0, 'tag': 'p1', 'type': 'maxe1'},
51 {'drop': False,
52 'negands': [{'attack': 'out', 'drop': True, 'index': 0, 'tag': 'n1', 'type': 'ine3'},
53 {'drop': False, 'index': 0, 'tag': 'n2', 'type': 'default'}],
54 'tag': 'p2',
55 'type': 'negand'}],
56 'left': {'adjustedAns': [['POPLATEK MESICNE', 110, 13090, 44, 55119128.7],
57 ['POPLATEK PO OBRATU', 10639, 10639, 0, 2.3283064365386963e-10],
58 ['POPLATEK TYDNE', 2759, 4479, 4, 10067937.3]],
59 'analyst': {'ans': [('POPLATEK MESICNE', 56048551.6000011), ('POPLATEK PO OBRATU', 3433014.1),
60 ('POPLATEK TYDNE', 10067937.3)],
61 'cols': ['c1', 'agg1'],
62 'sql': 'SELECT frequency AS c1,\n'
63 ' sum(amount) AS agg1\n'
64 'FROM transactions\n'
65 "WHERE (birth_number = '535812')\n"
66 ' OR (acct_district_id = 2\n'
67 " AND (birth_number <> '333333')\n"
68 " AND (bank <> 'CD'))\n"
69 'GROUP BY 1'},
70 'cloak': {'ans': [('POPLATEK MESICNE', 110, 13998, 41, 56048551.6),
71 ('POPLATEK PO OBRATU', 150, 10639, 2, 3433014.1),
72 ('POPLATEK TYDNE', 2759, 4479, 4, 10067937.3)],
73 'cols': ['c1', 'min_uid', 'max_uid', 'cnt_uid', 'agg1'],
74 'sql': 'SELECT frequency AS c1,\n'
75 ' min(uid) AS min_uid,\n'
76 ' max(uid) AS max_uid,\n'
77 ' count(distinct uid) AS cnt_uid,\n'
78 ' sum(agg) AS agg1\n'
79 'FROM\n'
80 ' (SELECT frequency,\n'
81 ' uid,\n'
82 ' sum(amount) as agg\n'
83 ' FROM transactions\n'
84 " WHERE (birth_number = '535812')\n"
85 ' OR (acct_district_id = 2\n'
86 " AND (birth_number <> '333333')\n"
87 " AND (bank <> 'CD'))\n"
88 ' GROUP BY 1,\n'
89 ' 2) t\n'
90 'GROUP BY 1'},
91 'computations': {'bktUid': {150: {'POPLATEK PO OBRATU': {'adjustAgg': 1902746.4,
92 'adjustUid': 1,
93 'includedNative': 1902746.4,
94 'includedNonLE': 0,
95 'specs': {'p2': {'maxNegNative': 0,
96 'maxNegNonLE': 0,
97 'native': 1902746.4,
98 'negands': {},
99 'nonLE': 0}},
100 'type': 'down'}},
101 1031: {'POPLATEK MESICNE': {'adjustAgg': 3973.0,
102 'adjustUid': 1,
103 'includedNative': 0,
104 'includedNonLE': 3973.0,
105 'specs': {'p1': {'maxNegNative': 0,
106 'maxNegNonLE': 0,
107 'native': 0,
108 'negands': {},
109 'nonLE': 0},
110 'p2': {'maxNegNative': 3973.0,
111 'maxNegNonLE': 0,
112 'native': 3973.0,
113 'negands': {'n2': {'native': 3973.0,
114 'nonLE': 0}},
115 'nonLE': 3973.0}},
116 'type': 'up'}},
117 3100: {'POPLATEK MESICNE': {'adjustAgg': 365688.0,
118 'adjustUid': 1,
119 'includedNative': 0,
120 'includedNonLE': 365688.0,
121 'specs': {'p1': {'maxNegNative': 0,
122 'maxNegNonLE': 0,
123 'native': 0,
124 'negands': {},
125 'nonLE': 0},
126 'p2': {'maxNegNative': 365688.0,
127 'maxNegNonLE': 0,
128 'native': 365688.0,
129 'negands': {'n2': {'native': 365688.0,
130 'nonLE': 0}},
131 'nonLE': 365688.0}},
132 'type': 'up'}},
133 3269: {'POPLATEK MESICNE': {'adjustAgg': 43318.0,
134 'adjustUid': 1,
135 'includedNative': 0,
136 'includedNonLE': 43318.0,
137 'specs': {'p1': {'maxNegNative': 0,
138 'maxNegNonLE': 0,
139 'native': 0,
140 'negands': {},
141 'nonLE': 0},
142 'p2': {'maxNegNative': 43318.0,
143 'maxNegNonLE': 0,
144 'native': 43318.0,
145 'negands': {'n2': {'native': 43318.0,
146 'nonLE': 0}},
147 'nonLE': 43318.0}},
148 'type': 'up'}},
149 10639: {'POPLATEK PO OBRATU': {'adjustAgg': 1530267.7,
150 'adjustUid': 1,
151 'includedNative': 1530267.7,
152 'includedNonLE': 0,
153 'specs': {'p2': {'maxNegNative': 0,
154 'maxNegNonLE': 0,
155 'native': 1530267.7,
156 'negands': {},
157 'nonLE': 0}},
158 'type': 'down'}},
159 13090: {'POPLATEK MESICNE': {'adjustAgg': 1280760.0,
160 'adjustUid': 1,
161 'includedNative': 0,
162 'includedNonLE': 1280760.0,
163 'specs': {'p1': {'maxNegNative': 0,
164 'maxNegNonLE': 0,
165 'native': 0,
166 'negands': {},
167 'nonLE': 0},
168 'p2': {'maxNegNative': 1280760.0,
169 'maxNegNonLE': 0,
170 'native': 1280760.0,
171 'negands': {'n2': {'native': 1280760.0,
172 'nonLE': 0}},
173 'nonLE': 1280760.0}},
174 'type': 'up'}},
175 13998: {'POPLATEK MESICNE': {'adjustAgg': 2623161.9,
176 'adjustUid': 1,
177 'includedNative': 2623161.9,
178 'includedNonLE': 0,
179 'specs': {'p1': {'maxNegNative': 0,
180 'maxNegNonLE': 0,
181 'native': 2623161.9,
182 'negands': {},
183 'nonLE': 0},
184 'p2': {'maxNegNative': 0,
185 'maxNegNonLE': 0,
186 'native': 0,
187 'negands': {'n2': {'native': 0,
188 'nonLE': 0}},
189 'nonLE': 0}},
190 'type': 'down'}}},
191 'leValues': {'p1': ['POPLATEK MESICNE'],
192 'p2': ['POPLATEK PO OBRATU'],
193 'p2n2': ['POPLATEK MESICNE']},
194 'numLEnodes': 3,
195 'uidList': {'POPLATEK MESICNE': [110, 13090, 1031, 3100, 3269, 13090],
196 'POPLATEK PO OBRATU': [],
197 'POPLATEK TYDNE': [4479, 2759]}},
198 'debug': {},
199 'probe1': {'ans': [('POPLATEK MESICNE', 1, 13998, 13998, 0, None, None, 0, None, None, 4, 1031, 13090, 4,
200 1031, 13090, 40, 110, 13090),
201 ('POPLATEK PO OBRATU', 0, None, None, 0, None, None, 0, None, None, 0, None, None, 0, None,
202 None, 2, 150, 10639),
203 ('POPLATEK TYDNE', 0, None, None, 0, None, None, 0, None, None, 0, None, None, 0, None,
204 None, 4, 2759, 4479)],
205 'cols': ['c1', 'p1_full_cnt', 'p1_full_min', 'p1_full_max', 'p2n1_full_cnt', 'p2n1_full_min',
206 'p2n1_full_max', 'p2n1_part_cnt', 'p2n1_part_min', 'p2n1_part_max', 'p2n2_full_cnt',
207 'p2n2_full_min', 'p2n2_full_max', 'p2n2_part_cnt', 'p2n2_part_min', 'p2n2_part_max',
208 'p2_full_cnt', 'p2_full_min', 'p2_full_max'],
209 'parsed': {'POPLATEK MESICNE': {'p1': {'full_cnt': 1, 'full_max': 13998, 'full_min': 13998},
210 'p2': {'full_cnt': 40,
211 'full_max': 13090,
212 'full_min': 110,
213 'negands': {'n1': {'full_cnt': 0,
214 'full_max': None,
215 'full_min': None,
216 'part_cnt': 0,
217 'part_max': None,
218 'part_min': None},
219 'n2': {'full_cnt': 4,
220 'full_max': 13090,
221 'full_min': 1031,
222 'part_cnt': 4,
223 'part_max': 13090,
224 'part_min': 1031}}}},
225 'POPLATEK PO OBRATU': {'p1': {'full_cnt': 0, 'full_max': None, 'full_min': None},
226 'p2': {'full_cnt': 2,
227 'full_max': 10639,
228 'full_min': 150,
229 'negands': {'n1': {'full_cnt': 0,
230 'full_max': None,
231 'full_min': None,
232 'part_cnt': 0,
233 'part_max': None,
234 'part_min': None},
235 'n2': {'full_cnt': 0,
236 'full_max': None,
237 'full_min': None,
238 'part_cnt': 0,
239 'part_max': None,
240 'part_min': None}}}},
241 'POPLATEK TYDNE': {'p1': {'full_cnt': 0, 'full_max': None, 'full_min': None},
242 'p2': {'full_cnt': 4,
243 'full_max': 4479,
244 'full_min': 2759,
245 'negands': {'n1': {'full_cnt': 0,
246 'full_max': None,
247 'full_min': None,
248 'part_cnt': 0,
249 'part_max': None,
250 'part_min': None},
251 'n2': {'full_cnt': 0,
252 'full_max': None,
253 'full_min': None,
254 'part_cnt': 0,
255 'part_max': None,
256 'part_min': None}}}}},
257 'sql': 'SELECT frequency AS c1,\n'
258 ' count(DISTINCT p1_uid) AS p1_full_cnt,\n'
259 ' min(p1_uid) AS p1_full_min,\n'
260 ' max(p1_uid) AS p1_full_max,\n'
261 ' count(DISTINCT p2n1_uid) AS p2n1_full_cnt,\n'
262 ' min(p2n1_uid) AS p2n1_full_min,\n'
263 ' max(p2n1_uid) AS p2n1_full_max,\n'
264 ' count(DISTINCT p2n1_dup) AS p2n1_part_cnt,\n'
265 ' min(p2n1_uid) AS p2n1_part_min,\n'
266 ' max(p2n1_uid) AS p2n1_part_max,\n'
267 ' count(DISTINCT p2n2_uid) AS p2n2_full_cnt,\n'
268 ' min(p2n2_uid) AS p2n2_full_min,\n'
269 ' max(p2n2_uid) AS p2n2_full_max,\n'
270 ' count(DISTINCT p2n2_dup) AS p2n2_part_cnt,\n'
271 ' min(p2n2_uid) AS p2n2_part_min,\n'
272 ' max(p2n2_uid) AS p2n2_part_max,\n'
273 ' count(DISTINCT p2_uid) AS p2_full_cnt,\n'
274 ' min(p2_uid) AS p2_full_min,\n'
275 ' max(p2_uid) AS p2_full_max\n'
276 'FROM\n'
277 ' (SELECT frequency,\n'
278 ' uid,\n'
279 ' CASE\n'
280 " WHEN birth_number = '535812' THEN uid\n"
281 ' ELSE NULL\n'
282 ' END AS p1_uid,\n'
283 ' CASE\n'
284 ' WHEN acct_district_id = 2\n'
285 " AND birth_number = '333333'\n"
286 " AND bank <> 'CD' THEN uid\n"
287 ' ELSE NULL\n'
288 ' END AS p2n1_uid,\n'
289 ' CASE\n'
290 ' WHEN acct_district_id = 2\n'
291 " AND birth_number = '333333' THEN uid\n"
292 ' ELSE NULL\n'
293 ' END AS p2n1_dup,\n'
294 ' CASE\n'
295 ' WHEN acct_district_id = 2\n'
296 " AND birth_number <> '333333'\n"
297 " AND bank = 'CD' THEN uid\n"
298 ' ELSE NULL\n'
299 ' END AS p2n2_uid,\n'
300 ' CASE\n'
301 ' WHEN acct_district_id = 2\n'
302 " AND bank = 'CD' THEN uid\n"
303 ' ELSE NULL\n'
304 ' END AS p2n2_dup,\n'
305 ' CASE\n'
306 ' WHEN acct_district_id = 2\n'
307 " AND birth_number <> '333333'\n"
308 " AND bank <> 'CD' THEN uid\n"
309 ' ELSE NULL\n'
310 ' END AS p2_uid\n'
311 ' FROM\n'
312 ' (SELECT frequency,\n'
313 ' uid,\n'
314 ' amount,\n'
315 ' birth_number,\n'
316 ' acct_district_id,\n'
317 ' bank\n'
318 ' FROM transactions\n'
319 " WHERE (birth_number = '535812')\n"
320 ' OR (acct_district_id = 2) ) t) t\n'
321 'GROUP BY 1\n'
322 'HAVING count(DISTINCT p1_uid) < 7\n'
323 'OR count(DISTINCT p2_uid) < 7\n'
324 'OR count(DISTINCT p2n1_uid) < 7\n'
325 'OR count(DISTINCT p2n2_uid) < 7'},
326 'probe2': {'ans': [('POPLATEK MESICNE', 1031, None, None, 3973.0, 3973.0),
327 ('POPLATEK MESICNE', 3100, None, None, 365688.0, 365688.0),
328 ('POPLATEK MESICNE', 3269, None, None, 43318.0, 43318.0),
329 ('POPLATEK MESICNE', 13090, None, None, 1280760.0, 1280760.0),
330 ('POPLATEK MESICNE', 13998, 2623161.9, None, None, None),
331 ('POPLATEK PO OBRATU', 150, None, None, None, 1902746.4),
332 ('POPLATEK PO OBRATU', 10639, None, None, None, 1530267.7)],
333 'cols': ['c1', 'uid', 'p1_adj1', 'p2n1_adj1', 'p2n2_adj1', 'p2_adj1'],
334 'sql': 'SELECT frequency AS c1,\n'
335 ' uid,\n'
336 ' sum(p1_agg) AS p1_adj1,\n'
337 ' sum(p2n1_agg) AS p2n1_adj1,\n'
338 ' sum(p2n2_agg) AS p2n2_adj1,\n'
339 ' sum(p2_agg) AS p2_adj1\n'
340 'FROM\n'
341 ' (SELECT frequency,\n'
342 ' uid,\n'
343 ' CASE\n'
344 " WHEN birth_number = '535812' THEN amount\n"
345 ' ELSE NULL\n'
346 ' END AS p1_agg,\n'
347 ' CASE\n'
348 ' WHEN acct_district_id = 2\n'
349 " AND birth_number = '333333' THEN amount\n"
350 ' ELSE NULL\n'
351 ' END AS p2n1_agg,\n'
352 ' CASE\n'
353 ' WHEN acct_district_id = 2\n'
354 " AND bank = 'CD' THEN amount\n"
355 ' ELSE NULL\n'
356 ' END AS p2n2_agg,\n'
357 ' CASE\n'
358 ' WHEN acct_district_id = 2 THEN amount\n'
359 ' ELSE NULL\n'
360 ' END AS p2_agg\n'
361 ' FROM\n'
362 ' (SELECT frequency,\n'
363 ' uid,\n'
364 ' amount,\n'
365 ' birth_number,\n'
366 ' acct_district_id,\n'
367 ' bank\n'
368 ' FROM transactions\n'
369 " WHERE (frequency IN ('POPLATEK MESICNE')\n"
370 " AND birth_number = '535812')\n"
371 " OR (frequency IN ('POPLATEK PO OBRATU')\n"
372 ' AND acct_district_id = 2)\n'
373 " OR (frequency IN ('POPLATEK MESICNE')\n"
374 ' AND acct_district_id = 2\n'
375 " AND bank = 'CD') ) t) t\n"
376 'GROUP BY 1,\n'
377 ' 2'},
378 'spec2': {'POPLATEK MESICNE': [{'attack': 'in',
379 'drop': False,
380 'effect': 'LE',
381 'ignore': False,
382 'index': 0,
383 'tag': 'p1',
384 'type': 'maxe1'},
385 {'drop': False,
386 'effect': None,
387 'ignore': False,
388 'negands': [{'attack': 'out',
389 'drop': True,
390 'effect': 'LE0',
391 'ignore': False,
392 'index': 0,
393 'tag': 'n1',
394 'type': 'ine3'},
395 {'drop': False,
396 'effect': 'LE',
397 'ignore': False,
398 'index': 0,
399 'tag': 'n2',
400 'type': 'default'}],
401 'tag': 'p2',
402 'type': 'negand'}],
403 'POPLATEK PO OBRATU': [{'attack': 'in',
404 'drop': False,
405 'effect': 'LE0',
406 'ignore': False,
407 'index': 0,
408 'tag': 'p1',
409 'type': 'maxe1'},
410 {'drop': False,
411 'effect': 'LE',
412 'ignore': False,
413 'negands': [{'attack': 'out',
414 'drop': True,
415 'effect': 'LE0',
416 'ignore': False,
417 'index': 0,
418 'tag': 'n1',
419 'type': 'ine3'},
420 {'drop': False,
421 'effect': 'LE0',
422 'ignore': False,
423 'index': 0,
424 'tag': 'n2',
425 'type': 'default'}],
426 'tag': 'p2',
427 'type': 'negand'}],
428 'POPLATEK TYDNE': [{'attack': 'in',
429 'drop': False,
430 'effect': 'LE0',
431 'ignore': False,
432 'index': 0,
433 'tag': 'p1',
434 'type': 'maxe1'},
435 {'drop': False,
436 'effect': None,
437 'ignore': False,
438 'negands': [{'attack': 'out',
439 'drop': True,
440 'effect': 'LE0',
441 'ignore': False,
442 'index': 0,
443 'tag': 'n1',
444 'type': 'ine3'},
445 {'drop': False,
446 'effect': 'LE0',
447 'ignore': False,
448 'index': 0,
449 'tag': 'n2',
450 'type': 'default'}],
451 'tag': 'p2',
452 'type': 'negand'}]}},
453 'right': {'adjustedAns': [['POPLATEK MESICNE', 110, 13090, 44, 55119128.7],
454 ['POPLATEK PO OBRATU', 10639, 10639, 0, 2.3283064365386963e-10],
455 ['POPLATEK TYDNE', 2759, 4479, 4, 10067937.3]],
456 'analyst': {'ans': [('POPLATEK MESICNE', 56048551.6000011), ('POPLATEK PO OBRATU', 3433014.1),
457 ('POPLATEK TYDNE', 10067937.3)],
458 'cols': ['c1', 'agg1'],
459 'sql': 'SELECT frequency AS c1,\n'
460 ' sum(amount) AS agg1\n'
461 'FROM transactions\n'
462 "WHERE (birth_number = '535812')\n"
463 ' OR (acct_district_id = 2\n'
464 " AND (bank <> 'CD'))\n"
465 'GROUP BY 1'},
466 'cloak': {'ans': [('POPLATEK MESICNE', 110, 13998, 41, 56048551.6),
467 ('POPLATEK PO OBRATU', 150, 10639, 2, 3433014.1),
468 ('POPLATEK TYDNE', 2759, 4479, 4, 10067937.3)],
469 'cols': ['c1', 'min_uid', 'max_uid', 'cnt_uid', 'agg1'],
470 'sql': 'SELECT frequency AS c1,\n'
471 ' min(uid) AS min_uid,\n'
472 ' max(uid) AS max_uid,\n'
473 ' count(distinct uid) AS cnt_uid,\n'
474 ' sum(agg) AS agg1\n'
475 'FROM\n'
476 ' (SELECT frequency,\n'
477 ' uid,\n'
478 ' sum(amount) as agg\n'
479 ' FROM transactions\n'
480 " WHERE (birth_number = '535812')\n"
481 ' OR (acct_district_id = 2\n'
482 " AND (bank <> 'CD'))\n"
483 ' GROUP BY 1,\n'
484 ' 2) t\n'
485 'GROUP BY 1'},
486 'computations': {'bktUid': {150: {'POPLATEK PO OBRATU': {'adjustAgg': 1902746.4,
487 'adjustUid': 1,
488 'includedNative': 1902746.4,
489 'includedNonLE': 0,
490 'specs': {'p2': {'maxNegNative': 0,
491 'maxNegNonLE': 0,
492 'native': 1902746.4,
493 'negands': {},
494 'nonLE': 0}},
495 'type': 'down'}},
496 1031: {'POPLATEK MESICNE': {'adjustAgg': 3973.0,
497 'adjustUid': 1,
498 'includedNative': 0,
499 'includedNonLE': 3973.0,
500 'specs': {'p1': {'maxNegNative': 0,
501 'maxNegNonLE': 0,
502 'native': 0,
503 'negands': {},
504 'nonLE': 0},
505 'p2': {'maxNegNative': 3973.0,
506 'maxNegNonLE': 0,
507 'native': 3973.0,
508 'negands': {'n2': {'native': 3973.0,
509 'nonLE': 0}},
510 'nonLE': 3973.0}},
511 'type': 'up'}},
512 3100: {'POPLATEK MESICNE': {'adjustAgg': 365688.0,
513 'adjustUid': 1,
514 'includedNative': 0,
515 'includedNonLE': 365688.0,
516 'specs': {'p1': {'maxNegNative': 0,
517 'maxNegNonLE': 0,
518 'native': 0,
519 'negands': {},
520 'nonLE': 0},
521 'p2': {'maxNegNative': 365688.0,
522 'maxNegNonLE': 0,
523 'native': 365688.0,
524 'negands': {'n2': {'native': 365688.0,
525 'nonLE': 0}},
526 'nonLE': 365688.0}},
527 'type': 'up'}},
528 3269: {'POPLATEK MESICNE': {'adjustAgg': 43318.0,
529 'adjustUid': 1,
530 'includedNative': 0,
531 'includedNonLE': 43318.0,
532 'specs': {'p1': {'maxNegNative': 0,
533 'maxNegNonLE': 0,
534 'native': 0,
535 'negands': {},
536 'nonLE': 0},
537 'p2': {'maxNegNative': 43318.0,
538 'maxNegNonLE': 0,
539 'native': 43318.0,
540 'negands': {'n2': {'native': 43318.0,
541 'nonLE': 0}},
542 'nonLE': 43318.0}},
543 'type': 'up'}},
544 10639: {'POPLATEK PO OBRATU': {'adjustAgg': 1530267.7,
545 'adjustUid': 1,
546 'includedNative': 1530267.7,
547 'includedNonLE': 0,
548 'specs': {'p2': {'maxNegNative': 0,
549 'maxNegNonLE': 0,
550 'native': 1530267.7,
551 'negands': {},
552 'nonLE': 0}},
553 'type': 'down'}},
554 13090: {'POPLATEK MESICNE': {'adjustAgg': 1280760.0,
555 'adjustUid': 1,
556 'includedNative': 0,
557 'includedNonLE': 1280760.0,
558 'specs': {'p1': {'maxNegNative': 0,
559 'maxNegNonLE': 0,
560 'native': 0,
561 'negands': {},
562 'nonLE': 0},
563 'p2': {'maxNegNative': 1280760.0,
564 'maxNegNonLE': 0,
565 'native': 1280760.0,
566 'negands': {'n2': {'native': 1280760.0,
567 'nonLE': 0}},
568 'nonLE': 1280760.0}},
569 'type': 'up'}},
570 13998: {'POPLATEK MESICNE': {'adjustAgg': 2623161.9,
571 'adjustUid': 1,
572 'includedNative': 2623161.9,
573 'includedNonLE': 0,
574 'specs': {'p1': {'maxNegNative': 0,
575 'maxNegNonLE': 0,
576 'native': 2623161.9,
577 'negands': {},
578 'nonLE': 0},
579 'p2': {'maxNegNative': 0,
580 'maxNegNonLE': 0,
581 'native': 0,
582 'negands': {'n2': {'native': 0,
583 'nonLE': 0}},
584 'nonLE': 0}},
585 'type': 'down'}}},
586 'leValues': {'p1': ['POPLATEK MESICNE'],
587 'p2': ['POPLATEK PO OBRATU'],
588 'p2n2': ['POPLATEK MESICNE']},
589 'numLEnodes': 3,
590 'uidList': {'POPLATEK MESICNE': [110, 13090, 1031, 3100, 3269, 13090],
591 'POPLATEK PO OBRATU': [],
592 'POPLATEK TYDNE': [4479, 2759]}},
593 'debug': {},
594 'probe1': {'ans': [('POPLATEK MESICNE', 1, 13998, 13998, 4, 1031, 13090, 4, 1031, 13090, 40, 110, 13090),
595 ('POPLATEK PO OBRATU', 0, None, None, 0, None, None, 0, None, None, 2, 150, 10639),
596 ('POPLATEK TYDNE', 0, None, None, 0, None, None, 0, None, None, 4, 2759, 4479)],
597 'cols': ['c1', 'p1_full_cnt', 'p1_full_min', 'p1_full_max', 'p2n2_full_cnt', 'p2n2_full_min',
598 'p2n2_full_max', 'p2n2_part_cnt', 'p2n2_part_min', 'p2n2_part_max', 'p2_full_cnt',
599 'p2_full_min', 'p2_full_max'],
600 'parsed': {'POPLATEK MESICNE': {'p1': {'full_cnt': 1, 'full_max': 13998, 'full_min': 13998},
601 'p2': {'full_cnt': 40,
602 'full_max': 13090,
603 'full_min': 110,
604 'negands': {'n2': {'full_cnt': 4,
605 'full_max': 13090,
606 'full_min': 1031,
607 'part_cnt': 4,
608 'part_max': 13090,
609 'part_min': 1031}}}},
610 'POPLATEK PO OBRATU': {'p1': {'full_cnt': 0, 'full_max': None, 'full_min': None},
611 'p2': {'full_cnt': 2,
612 'full_max': 10639,
613 'full_min': 150,
614 'negands': {'n2': {'full_cnt': 0,
615 'full_max': None,
616 'full_min': None,
617 'part_cnt': 0,
618 'part_max': None,
619 'part_min': None}}}},
620 'POPLATEK TYDNE': {'p1': {'full_cnt': 0, 'full_max': None, 'full_min': None},
621 'p2': {'full_cnt': 4,
622 'full_max': 4479,
623 'full_min': 2759,
624 'negands': {'n2': {'full_cnt': 0,
625 'full_max': None,
626 'full_min': None,
627 'part_cnt': 0,
628 'part_max': None,
629 'part_min': None}}}}},
630 'sql': 'SELECT frequency AS c1,\n'
631 ' count(DISTINCT p1_uid) AS p1_full_cnt,\n'
632 ' min(p1_uid) AS p1_full_min,\n'
633 ' max(p1_uid) AS p1_full_max,\n'
634 ' count(DISTINCT p2n2_uid) AS p2n2_full_cnt,\n'
635 ' min(p2n2_uid) AS p2n2_full_min,\n'
636 ' max(p2n2_uid) AS p2n2_full_max,\n'
637 ' count(DISTINCT p2n2_dup) AS p2n2_part_cnt,\n'
638 ' min(p2n2_uid) AS p2n2_part_min,\n'
639 ' max(p2n2_uid) AS p2n2_part_max,\n'
640 ' count(DISTINCT p2_uid) AS p2_full_cnt,\n'
641 ' min(p2_uid) AS p2_full_min,\n'
642 ' max(p2_uid) AS p2_full_max\n'
643 'FROM\n'
644 ' (SELECT frequency,\n'
645 ' uid,\n'
646 ' CASE\n'
647 " WHEN birth_number = '535812' THEN uid\n"
648 ' ELSE NULL\n'
649 ' END AS p1_uid,\n'
650 ' CASE\n'
651 ' WHEN acct_district_id = 2\n'
652 " AND bank = 'CD' THEN uid\n"
653 ' ELSE NULL\n'
654 ' END AS p2n2_uid,\n'
655 ' CASE\n'
656 ' WHEN acct_district_id = 2\n'
657 " AND bank = 'CD' THEN uid\n"
658 ' ELSE NULL\n'
659 ' END AS p2n2_dup,\n'
660 ' CASE\n'
661 ' WHEN acct_district_id = 2\n'
662 " AND bank <> 'CD' THEN uid\n"
663 ' ELSE NULL\n'
664 ' END AS p2_uid\n'
665 ' FROM\n'
666 ' (SELECT frequency,\n'
667 ' uid,\n'
668 ' amount,\n'
669 ' birth_number,\n'
670 ' acct_district_id,\n'
671 ' bank\n'
672 ' FROM transactions\n'
673 " WHERE (birth_number = '535812')\n"
674 ' OR (acct_district_id = 2) ) t) t\n'
675 'GROUP BY 1\n'
676 'HAVING count(DISTINCT p1_uid) < 7\n'
677 'OR count(DISTINCT p2_uid) < 7\n'
678 'OR count(DISTINCT p2n2_uid) < 7'},
679 'probe2': {'ans': [('POPLATEK MESICNE', 1031, None, 3973.0, 3973.0),
680 ('POPLATEK MESICNE', 3100, None, 365688.0, 365688.0),
681 ('POPLATEK MESICNE', 3269, None, 43318.0, 43318.0),
682 ('POPLATEK MESICNE', 13090, None, 1280760.0, 1280760.0),
683 ('POPLATEK MESICNE', 13998, 2623161.9, None, None),
684 ('POPLATEK PO OBRATU', 150, None, None, 1902746.4),
685 ('POPLATEK PO OBRATU', 10639, None, None, 1530267.7)],
686 'cols': ['c1', 'uid', 'p1_adj1', 'p2n2_adj1', 'p2_adj1'],
687 'sql': 'SELECT frequency AS c1,\n'
688 ' uid,\n'
689 ' sum(p1_agg) AS p1_adj1,\n'
690 ' sum(p2n2_agg) AS p2n2_adj1,\n'
691 ' sum(p2_agg) AS p2_adj1\n'
692 'FROM\n'
693 ' (SELECT frequency,\n'
694 ' uid,\n'
695 ' CASE\n'
696 " WHEN birth_number = '535812' THEN amount\n"
697 ' ELSE NULL\n'
698 ' END AS p1_agg,\n'
699 ' CASE\n'
700 ' WHEN acct_district_id = 2\n'
701 " AND bank = 'CD' THEN amount\n"
702 ' ELSE NULL\n'
703 ' END AS p2n2_agg,\n'
704 ' CASE\n'
705 ' WHEN acct_district_id = 2 THEN amount\n'
706 ' ELSE NULL\n'
707 ' END AS p2_agg\n'
708 ' FROM\n'
709 ' (SELECT frequency,\n'
710 ' uid,\n'
711 ' amount,\n'
712 ' birth_number,\n'
713 ' acct_district_id,\n'
714 ' bank\n'
715 ' FROM transactions\n'
716 " WHERE (frequency IN ('POPLATEK MESICNE')\n"
717 " AND birth_number = '535812')\n"
718 " OR (frequency IN ('POPLATEK PO OBRATU')\n"
719 ' AND acct_district_id = 2)\n'
720 " OR (frequency IN ('POPLATEK MESICNE')\n"
721 ' AND acct_district_id = 2\n'
722 " AND bank = 'CD') ) t) t\n"
723 'GROUP BY 1,\n'
724 ' 2'},
725 'spec2': {'POPLATEK MESICNE': [{'attack': 'in',
726 'drop': False,
727 'effect': 'LE',
728 'ignore': False,
729 'index': 0,
730 'tag': 'p1',
731 'type': 'maxe1'},
732 {'drop': False,
733 'effect': None,
734 'ignore': False,
735 'negands': [{'attack': 'out',
736 'drop': True,
737 'effect': None,
738 'ignore': True,
739 'index': 0,
740 'tag': 'n1',
741 'type': 'ine3'},
742 {'drop': False,
743 'effect': 'LE',
744 'ignore': False,
745 'index': 0,
746 'tag': 'n2',
747 'type': 'default'}],
748 'tag': 'p2',
749 'type': 'negand'}],
750 'POPLATEK PO OBRATU': [{'attack': 'in',
751 'drop': False,
752 'effect': 'LE0',
753 'ignore': False,
754 'index': 0,
755 'tag': 'p1',
756 'type': 'maxe1'},
757 {'drop': False,
758 'effect': 'LE',
759 'ignore': False,
760 'negands': [{'attack': 'out',
761 'drop': True,
762 'effect': None,
763 'ignore': True,
764 'index': 0,
765 'tag': 'n1',
766 'type': 'ine3'},
767 {'drop': False,
768 'effect': 'LE0',
769 'ignore': False,
770 'index': 0,
771 'tag': 'n2',
772 'type': 'default'}],
773 'tag': 'p2',
774 'type': 'negand'}],
775 'POPLATEK TYDNE': [{'attack': 'in',
776 'drop': False,
777 'effect': 'LE0',
778 'ignore': False,
779 'index': 0,
780 'tag': 'p1',
781 'type': 'maxe1'},
782 {'drop': False,
783 'effect': None,
784 'ignore': False,
785 'negands': [{'attack': 'out',
786 'drop': True,
787 'effect': None,
788 'ignore': True,
789 'index': 0,
790 'tag': 'n1',
791 'type': 'ine3'},
792 {'drop': False,
793 'effect': 'LE0',
794 'ignore': False,
795 'index': 0,
796 'tag': 'n2',
797 'type': 'default'}],
798 'tag': 'p2',
799 'type': 'negand'}]}}}