> For the complete documentation index, see [llms.txt](https://cfcouchbase.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cfcouchbase.ortusbooks.com/usage/executing-queries.md).

# Executing Queries

One of the most powerful parts of Couchbase Server is the ability to find data through map / reduce [views and indexes](http://docs.couchbase.com/admin/admin/Views/views-intro.html) or by executing [N1QL (SQL like)](http://developer.couchbase.com/documentation/server/4.0/n1ql/index.html) queries which were introduced in Couchbase Server 4.0. We do not cover all the intricacies of views or N1QL, for that please visit the official [Couchbase Docs](http://developer.couchbase.com/documentation/server/4.0/introduction/intro.html). We focus on how to leverage them from CFCouchbase.

There are 2 types of queries available in the SDK:

* [View Queries](/usage/executing-queries/view-queries.md)
* [N1QL Queries](/usage/executing-queries/n1ql-queries.md)

Both types of queries can be executed through the parent facade of `query()` or through their standalone methods of `viewQuery()` and `n1qlQuery()`.


---

# 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 dynamically by asking a question.

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

```
GET https://cfcouchbase.ortusbooks.com/usage/executing-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.
