> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ditto.live/llms.txt
> Use this file to discover all available pages before exploring further.

# Ditto Query Language Overview

> Ditto Query Language (DQL) is a powerful, flexible query language designed specifically for use with the Ditto platform. It allows you to perform complex data operations with ease, enabling real-time synchronization and efficient data management.

DQL is designed to simplify data interactions in your applications, providing a consistent and intuitive interface for querying and manipulating data. Whether you're a developer looking to streamline your backend operations or an engineer focused on optimizing data flow, DQL is tailored to meet your needs.

## DQL Quick Reference

### [SELECT](/dql/select)

```sql DQL theme={null}
SELECT [DISTINCT] * | field1, field2, ... | aggregate_function(field) [AS alias]
FROM your_collection_name
[WHERE condition]
[GROUP BY groupby_expression_1, groupby_expression_2, ...]
[HAVING condition]
[ORDER BY orderby_expression_1, orderby_expression_2, ... [ASC|DESC]]
[LIMIT limit_value]
[OFFSET number_of_documents_to_skip]
```

### [INSERT](/dql/insert)

```sql DQL theme={null}
INSERT INTO your_collection_name
DOCUMENTS([document1]),([document2]), ([document3]), ...
[ON ID CONFLICT [FAIL | DO NOTHING | DO UPDATE]]
```

### [UPDATE](/dql/update)

```sql DQL theme={null}

UPDATE your_collection_name
SET field1 = value1, field2 -> [mutator], ...
WHERE [condition]
```

### [EVICT](/dql/evict)

```sql DQL theme={null}
EVICT FROM your_collection_name
WHERE [condition]
```

<Info>
  To learn the intricacies of read-and-write operations, see [INSERT](/dql/insert), [SELECT](/dql/select), [UPDATE](/dql/update), and [DELETE](/dql/delete).
</Info>
