appendpipe command: Examples
Examples for using the SPL2 appendpipe command.
The following example append subtotals for each action across all users.
from main
| stats count() AS user_count BY action, clientip
| appendpipe [stats sum(user_count) AS 'User Count' BY action | eval user = "TOTAL - USER COUNT"]
| sort action
The results look something like this:
| action | clientip | user_count | User Count | user |
|---|---|---|---|---|
| addtocart | 107.1.146.207 | 15 | NULL | NULL |
| addtocart | 108.65.113.83 | 16 | NULL | NULL |
| addtocart | 109.169.32.135 | 3 | NULL | NULL |
| addtocart | NULL | NULL | 34 | TOTAL - USER COUNT |
| changequantity | 107.1.146.207 | 2 | NULL | NULL |
| changequantity | 108.65.113.83 | 1 | NULL | NULL |
| changequantity | 109.169.32.135 | 2 | NULL | NULL |
| changequantity | NULL | NULL | 4 | TOTAL - USER COUNT |
See also
appendpipe command