To create segments that use aggregation and/or grouping you can use queries.
Queries are like advanced segments. Unlike segments, queries support grouping and aggregation. They are written using the Permutive Query Language, which is similar to SQL. You can create queries in the dashboard, then they can be converted into segments using boolean logic.
Note: Currently you cannot deploy queries as segments through the Permutive dashboard. If you'd like to use queries in your project please let us know and we can create the queries and convert them to segments for you.
Extra Functionality Supported By Queries
Grouping, for example to group by session.
Here are a couple of examples of segments you can build using queries
- Returning user. A user who has had more than 2 sessions to the site
- User with high average bidding value. A user who, for this ad slot, has an average winning bid that is very high (using prebid.js data).