You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example collects all users who did not perform the `Shoes Bought` event at least once and don't have a `total_spend` trait with a value greater than `200`:
448
448
449
449
```sql
450
-
NOT ( event(‘Shoes Bought’).count() >=1AND trait(‘total_spend’) >200 )
450
+
NOT ( event('Shoes Bought').count() >=1AND trait('total_spend') >200 )
451
451
```
452
452
453
453
#### Bought with minimum total spend
454
454
455
455
This example collects all accounts where all associated users performed the `Shoes Bought` event at least once and have a `total_spend` trait greater than `200`:
456
456
457
457
```sql
458
-
ALL ( event(‘Shoes Bought’).count() >=1AND trait(‘total_spend’) >200 )
458
+
ALL ( event('Shoes Bought').count() >=1AND trait('total_spend') >200 )
459
459
```
460
460
461
461
#### No users bought at least once
462
462
463
463
This example collects all accounts where no associated users performed the `Shoes Bought` event at least once:
464
464
465
465
```sql
466
-
ALL NOT event(‘Shoes Bought’).count() >=1
466
+
ALL NOT event('Shoes Bought').count() >=1
467
467
```
468
468
469
469
#### Any users bought at least once
470
470
471
471
This example collects all accounts where any associated users performed the `Shoes Bought` event at least once:
472
472
473
473
```sql
474
-
ANY event(‘Shoes Bought’).count() >=1
474
+
ANY event('Shoes Bought').count() >=1
475
475
```
476
476
477
477
### Computed Traits
@@ -487,15 +487,15 @@ Another way to think of this would be:
487
487
Here's how you could do that in Segment's query language:
This example calculates the minimum spend for each user, based on all `Shoes Bought` events, where the price was greater than `100` and the brand was `My_Brand`:
0 commit comments