# Complex queries

Use the "where" argument to construct complex queries that has multiple conditions and nesting levels. For e.g. to query all car assets manufactured after year 2010:

<pre class="language-graphql"><code class="lang-graphql"><strong>query {
</strong>    car (where: {year: {_gt: 2010} }) {
        Id
        make
        color
    }
}
</code></pre>

Response:

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "data": {
        "car_count": 1,
        "car": [
            {
                "Id": "car1",
                "color": "red",
                "make": "ford"
            }
        ]
    }
}
</code></pre>

The query can include multiple conditions and include conditions on nested object fields too. For a complete list of supported operators, refer to [Operator](/developers/api-reference/asset-tokenization/graphql/operators.md)

```graphql
query {
    car (where: {
        _and: [
                {year: {_gt: 2010} },
                {engine: {isDefective: {_eq: true}}}
              ]
            }
        ) {
        Id
        make
        color
    }
}
```

Response:

```json
{
    "data": {
        "car_count": 1,
        "car": [
            {
                "Id": "car1",
                "color": "red",
                "make": "ford"
            }
        ]
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spydra.app/developers/api-reference/asset-tokenization/graphql/complex-queries.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
