earliest=-60d@d latest=-0d@d msg=login_daily | eval time=strftime(_time, "%m/%d/%y") | where cadt>1421366400 |stats count by uid time platform plats fplat is_p gender
The above query gives me data presented like so:
+-----+---------+----------+-------+-------+------+-------+
| uid | time | platform | plats | fplat | is_p | count |
+-----+---------+----------+-------+-------+------+-------+
| 1 | 1/16/15 | 2 | 0,2 | 0 | | 1 |
| 1 | 1/17/15 | 2 | 0,2 | 0 | | 1 |
| 1 | 1/18/15 | 2 | 0,2 | 0 | | 1 |
| 1 | 1/19/15 | 2 | 0,2 | 0 | | 1 |
| 1 | 1/20/15 | 2 | 0,2 | 0 | | 1 |
| 1 | 1/21/15 | 2 | 0,2 | 0 | | 1 |
| 2 | 2/8/15 | 4 | 2,0,4 | 2 | | 1 |
| 3 | 1/29/15 | 1 | 0,1,2 | 1 | | 1 |
| 3 | 1/30/15 | 1 | 0,1,2 | 1 | 1 | 1 |
| 3 | 1/31/15 | 1 | 0,1,2 | 1 | 1 | 1 |
| 3 | 2/2/15 | 1 | 0,1,2 | 1 | 1 | 1 |
| 3 | 2/3/15 | 1 | 0,1,2 | 1 | 1 | 1 |
| 4 | 1/28/15 | 2 | 2 | 2 | | 1 |
| 4 | 1/29/15 | 2 | 2 | 2 | | 1 |
| 5 | 1/18/15 | 4 | 2,4 | 2 | | 1 |
| 6 | 1/30/15 | 2 | 2 | 2 | | 1 |
| 7 | 2/2/15 | 0 | 2,0 | 2 | | 1 |
| 8 | 3/9/15 | 1 | 2,1 | 2 | | 1 |
| 9 | 2/28/15 | 1 | 1,2 | 2 | | 1 |
| 9 | 3/2/15 | 1 | 1,2 | 2 | | 1 |
| 9 | 3/5/15 | 1 | 1,2 | 2 | | 1 |
| 9 | 3/10/15 | 1 | 1,2 | 2 | | 1 |
| 9 | 3/11/15 | 1 | 1,2 | 2 | | 1 |
| 9 | 3/15/15 | 1 | 1,2 | 2 | | 1 |
| 10 | 3/15/15 | 2 | 2 | 2 | | 1 |
| 11 | 3/16/15 | 0 | 2,0 | 2 | | 1 |
| 12 | 3/12/15 | 4 | 2,4 | 2 | | 1 |
+-----+---------+----------+-------+-------+------+-------+
What I would like to do is this:
For each grouping of UID s, if they do not have a platform of 2 in any instance, remove it from their plats column. For example, UID 3 does not have 2 in any of its platform instances. I would like to strip out 2 from their plats data.
Is this possible? Please let me know if I can make this more clear.
... View more