---
title: havingPredicate
framework: coredata
role: symbol
role_heading: Instance Property
path: coredata/nsfetchrequest/havingpredicate
---

# havingPredicate

The predicate used to filter rows being returned by a query containing a GROUP BY directive.

## Declaration

```swift
var havingPredicate: NSPredicate? { get set }
```

## Discussion

Discussion If a havingPredicate value is supplied, the predicate will be run after. Specifying a havingPredicate requires that propertiesToGroupBy also be specified.

## See Also

### Related Documentation

- [NSFetchRequest](coredata/nsfetchrequest.md)

### Grouping and Filtering Dictionary Results

- [propertiesToGroupBy](coredata/nsfetchrequest/propertiestogroupby.md)
