---
title: How to use functions like COUNT(), AVG(), SUM(), MAX() and MIN() in DESelect Segment?
slug: segment/how-to-use-functions-like-count-avg-sum-max-and-min-in-deselect-segment
docTags: 
createdAt: 2026-01-19T00:22:03.721Z
---

**Question:** Can you use functions like COUNT(), AVG(), SUM(), MAX(), and MIN() in DESelect Segment?

**Answer:** Yes, you can use those functions in formulas when you create subqueries with DESelect Segment. The following Aggregations are supported in DESelect Segment:&#x20;

- **COUNT**: count the number of records where there is a value for a field
- **SUM**: sums up the values of a field over multiple records
- **MIN**: take the lowest value of a field over multiple records
- **MAX**: take the highest value of a field over multiple records
- **AVG**: take the average value of a field over multiple records



![](https://support.deselect.com/hc/article_attachments/29388363324945)



![](https://support.deselect.com/hc/article_attachments/29388363329169)

For example, you want to send a voucher to contacts that have bought for more than 100 dollars in the last 2 months.
