---
title: HKQuantityAggregationStyle
framework: healthkit
role: symbol
role_heading: Enumeration
path: healthkit/hkquantityaggregationstyle
---

# HKQuantityAggregationStyle

Constant values that describe how quantities can be aggregated over time.

## Declaration

```swift
enum HKQuantityAggregationStyle
```

## Overview

Overview A quantity type’s aggregation style determines the type of statistics queries that you can perform. Discrete types support average, minimum, and maximum queries. Cumulative types support only sum queries. For more information, see HKStatisticsQuery.

## Topics

### Aggregation Styles

- [HKQuantityAggregationStyle.cumulative](healthkit/hkquantityaggregationstyle/cumulative.md)
- [HKQuantityAggregationStyle.discreteArithmetic](healthkit/hkquantityaggregationstyle/discretearithmetic.md)
- [HKQuantityAggregationStyle.discreteTemporallyWeighted](healthkit/hkquantityaggregationstyle/discretetemporallyweighted.md)
- [HKQuantityAggregationStyle.discreteEquivalentContinuousLevel](healthkit/hkquantityaggregationstyle/discreteequivalentcontinuouslevel.md)

### Deprecated Styles

- [discrete](healthkit/hkquantityaggregationstyle/discrete.md)

### Initializers

- [init(rawValue:)](healthkit/hkquantityaggregationstyle/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Accessing Quantity Type Data

- [aggregationStyle](healthkit/hkquantitytype/aggregationstyle.md)
- [is(compatibleWith:)](healthkit/hkquantitytype/is(compatiblewith:).md)
