# Behavior Aggregation Rules Depending on your behavior segment rules, you can apply the additional following aggregation functions filters to the number of behaviors per profile based on the rules you set. This article contains information on the following topics: * [Count](#count) * [Average](#average) * [Count Distinct](#count-distinct) * [First](#first) * [Last](#last) * [Sum](#sum) * [Min](#min) * [Max](#max) * [Related Documentation](#related-documentation) ## Count Returns only the profiles based on the number of behavior records set in COUNT. #### Example * Behavior Rule: * Item = `Ping Pong Table` COUNT >= 5 | email | first_name | last_name | item | | --- | --- | --- | --- | | nancybowman@gmail.com | Nancy | Bowman | Ping Pong Table | | nancybowman@gmail.com | Nancy | Bowman | Ping Pong Table | | nancybowman@gmail.com | Nancy | Bowman | Ping Pong Table | | nancybowman@gmail.com | Nancy | Bowman | Ping Pong Table | | nancybowman@gmail.com | Nancy | Bowman | Ping Pong Table | | timothylewis@gmx.de | Timothy | Lewis | Ping Pong Table | | timothylewis@gmx.de | Timothy | Lewis | Ping Pong Table | | timothylewis@gmx.de | Timothy | Lewis | Ping Pong Table | | timothylewis@gmx.de | Timothy | Lewis | Ping Pong Table | | timothylewis@gmx.de | Timothy | Lewis | Ping Pong Table | | jamieguzowski@yahoo.com | Jamie | Guzowski | Ping Pong Table | | jamieguzowski@yahoo.com | Jamie | Guzowski | Ping Pong Table | | jamieguzowski@yahoo.com | Jamie | Guzowski | Ping Pong Table | | jamieguzowski@yahoo.com | Jamie | Guzowski | Ping Pong Table | | jamieguzowski@yahoo.com | Jamie | Guzowski | Ping Pong Table | | kimberlylumpkins@terra.com.br | Kimberly | Lumpkins | Ping Pong Table | | kimberlylumpkins@terra.com.br | Kimberly | Lumpkins | Ping Pong Table | | kimberlylumpkins@terra.com.br | Kimberly | Lumpkins | Ping Pong Table | | kimberlylumpkins@terra.com.br | Kimberly | Lumpkins | Ping Pong Table | | kimberlylumpkins@terra.com.br | Kimberly | Lumpkins | Ping Pong Table | ## Average Only selects the profiles that contain the average of a function of a selected a behavior column. #### Example * Behavior Rule (From ping pong table purchases, only select profiles where the total price averages to more than $5) * Item = `Ping Pong Table` * Average `total_price` > greater than 5 | email | first_name | last_name | item | total_price | | --- | --- | --- | --- | --- | | williammcintyre@yahoo.com.mx | William | Mcintyre | Ping Pong Table | 10.5 | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 4.25 | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 12.99 | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 6.5 | | suzannecraven@yahoo.es | Suzanne | Craven | Ping Pong Table | 14 | | suzannecraven@yahoo.es | Suzanne | Craven | Ping Pong Table | 35.2 | ## Count Distinct The unique count of the selected behavior column fulfills the chosen function. #### Example * Count distinct by `item` >= 3 | email | first_name | last_name | item | | --- | --- | --- | --- | | kimberlylumpkins@terra.com.br | Kimberly | Lumpkins | Brake Pads | | kimberlylumpkins@terra.com.br | Kimberly | Lumpkins | Blender | | kimberlylumpkins@terra.com.br | Kimberly | Lumpkins | Blender | | kimberlylumpkins@terra.com.br | Kimberly | Lumpkins | Baby Monitor | | kimberlylumpkins@terra.com.br | Kimberly | Lumpkins | Alternator | | williammcintyre@yahoo.com.mx | William | Mcintyre | Brake Pads | | williammcintyre@yahoo.com.mx | William | Mcintyre | Basketball | | williammcintyre@yahoo.com.mx | William | Mcintyre | Alternator | ## First Takes the first value of a selected column when you put it in order of another column. #### Example * Item = `Ping Pong Table` * FIRST `item` = `Ping Pong Table, order by `total_price` | email | first_name | last_name | item | total_price | | --- | --- | --- | --- | --- | | williammcintyre@yahoo.com.mx | William | Mcintyre | Ping Pong Table | 10.5 | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 4.25 | | suzannecraven@yahoo.es | Suzanne | Craven | Ping Pong Table | 14 | ## Last Takes the first value of a selected column when you put it in order of another column. #### Example * Item = `Ping Pong Table` * LAST `item` = `Ping Pong Table, order by `total_price` | email | first_name | last_name | item | total_price | | --- | --- | --- | --- | --- | | williammcintyre@yahoo.com.mx | William | Mcintyre | Ping Pong Table | 10.5 | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 12.99 | | suzannecraven@yahoo.es | Suzanne | Craven | Ping Pong Table | 35.2 | ## Sum #### Only selects the profiles that contain the sum of a function of a selected behavior column. #### Example * Item = `Ping Pong Table` * sum `total_price` > greater than 20 | email | first_name | last_name | item | total_price | | --- | --- | --- | --- | --- | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 4.25 | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 12.99 | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 6.5 | | suzannecraven@yahoo.es | Suzanne | Craven | Ping Pong Table | 14 | | suzannecraven@yahoo.es | Suzanne | Craven | Ping Pong Table | 35.2 | ## Min #### Example Only selects the profiles where the lowest value of a chosen behavior column fulfills the selected function. * Item = `Ping Pong Table` * MIN `total_price` > greater than 12 | email | first_name | last_name | item | total_price | | --- | --- | --- | --- | --- | | suzannecraven@yahoo.es | Suzanne | Craven | Ping Pong Table | 14 | | suzannecraven@yahoo.es | Suzanne | Craven | Ping Pong Table | 35.2 | ## Max Only selects the profiles where the highest value of a chosen behavior column fulfills the selected function. #### Example * Item = `Ping Pong Table` * MAX `total_price` > greater than 12 | email | first_name | last_name | item | total_price | | --- | --- | --- | --- | --- | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 4.25 | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 12.99 | | gwenmcrary@libero.it | Gwen | Mcrary | Ping Pong Table | 6.5 | | suzannecraven@yahoo.es | Suzanne | Craven | Ping Pong Table | 14 | | suzannecraven@yahoo.es | Suzanne | Craven | Ping Pong Table | 35.2 | ## Related Documentation [Customizing Behavior and Attribute Columns for Segment Rules](/products/customer-data-platform/audience-studio/segment/rule-operator/customizing-behavior-and-attribute-columns-for-segment-rules)