---
title: Guide To Writing Queries
slug: guide-to-writing-queries
createdAt: 2023-03-17T16:52:52.000Z
---

## Query Terms

A query consists of one or multiple **Query Terms**, which are connected using the logical operators <font color="#9900ef">`and`</font> or <font color="#9900ef">`or`</font>.&#x20;

![](https://api.archbee.com/api/optimize/fRibh2_2NwaS_4MGgrZuA/RYs7jCUiL_ZvU15jLZBee_queryterms.png)

Each query term consists of a **left-hand side argument (LHS)**, an **operator**, and a **right-hand side argument (RHS)**. Some operators expect multiple arguments on the RHS, such as [between](docId:-A6C2C3F2FW7YdjuVamvz) and [in](docId:-A6C2C3F2FW7YdjuVamvz).

::Image[]{src="https://api.archbee.com/api/optimize/fRibh2_2NwaS_4MGgrZuA/pBlMtQPK5iDF1VYqg5B6w_queryterm.png" size="62" width="603" height="143" position="center" showCaption="false"}

The **LHS must always be a&#x20;**[field](docId\:kzBTLLYb4xfJ8DF290vXI)**.** The RHS can be either a [field](docId\:kzBTLLYb4xfJ8DF290vXI) or a [value](docId\:KhWZ7b0QhFIwTzxiLv2JI).

## Where to go from here

- **[And, Or, Not](docId\:gzGXWl0kWHUkwWnUoy9PN)
- **[Fields & Links](docId\:kzBTLLYb4xfJ8DF290vXI)

