> For the complete documentation index, see [llms.txt](https://docs.cw.crisisworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cw.crisisworks.com/security-and-support/technical-reference/cql-reference.md).

# CQL Reference

This section gives an overview of CQL including syntax from basic single field queries to advanced multi-field and multi-register queries.

CQL (Crisisworks Query Language) provides a way to build structured queries including multi-field and multi-register queries which can also be used in many ways including to export data and prepare reports.

The are two main ways to perform a CQL query are:

1. Using the search box within [Register Filters](https://docs.cw.crisisworks.com/concepts-and-fundamentals/on-a-computer/searching-filtering-and-querying-registers.md#register-filters) (for field based filtering)
2. From the [Search bar](https://docs.cw.crisisworks.com/concepts-and-fundamentals/on-a-computer/searching-filtering-and-querying-registers.md#search-bar) (for more advanced queries across one or more registers)

Both methods must be performed within a specific register.

For more general information on these methods refer to [Searching & Filtering](https://docs.cw.crisisworks.com/concepts-and-fundamentals/on-a-computer/searching-filtering-and-querying-registers.md).

Queries are built by performing operations on fields. A full list of available fields can be found in the [Data Dictionary](broken://pages/kOWwnlRokYfxBf1Za2os).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cw.crisisworks.com/security-and-support/technical-reference/cql-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
