# Containing all

Learn how to check if a collection contains all elements of another.

This operator checks whether one collection contains all elements of another. It is the opposite of the [`containing none`](/reference/cql/expressions/events/criteria/operators/containing-none) operator.

Note that the result is always true if the second collection is empty, because the [empty set is a subset of every set](https://en.wikipedia.org/wiki/Empty_set#properties).

Also, keep in mind that neither the order nor duplicate elements affect the result since collections are treated as [sets](/reference/cql/data-types/core/collection#set).

> **Multi-condition criteria**
>
> You can [combine conditions](/reference/cql/expressions/events/criteria/overview#multi-condition-criteria) to create more advanced criteria.

## Syntax

The basic syntax is:

```cql
with /*<name>*/ containing all of /*<collection>*/
```

Alternatively, you can use the `including` keyword:

```cql
with /*<name>*/ including all of /*<collection>*/
```

The negation of this operation can be expressed as:

```cql
with /*<name>*/ not containing all of /*<collection>*/
```

Using the alternative syntax:

```cql
with /*<name>*/ not including all of /*<collection>*/
```

## Parameters

These are the supported parameters:

- `name`: `collection`

  The name of the [event property](/reference/cql/expressions/events/event-types) to search for in the collection.

- `collection`: `collection`

  The collection to check.

## Examples

Check if a product was abandoned with two specific categories:

```cql
user has viewed post with tags containing all of ["sport", "summer"]
```

Or to check the opposite:

```cql
user has viewed post with tags not containing all of ["sport", "summer"]
```
