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

# SQL overview

> Dialect summary for ToraDB SQL

ToraDB SQL supports **catalog**, **DDL**, **retrieval SELECT**, and **analytics SELECT**. Statements are case-insensitive for keywords.

## Statement types

| Category | Examples |
| - | - |
| Catalog | `SHOW TABLES`, `DESCRIBE t`, `SHOW MATERIALIZED VIEWS` |
| DDL | `CREATE TABLE`, `CREATE INDEX`, `DROP TABLE`, `COMPACT TABLE` |
| Retrieval | `SELECT ... SPARSE SEARCH ...`, `VECTOR SEARCH ...`, `BOOST`, `DECAY`, `FACETS`, `HIGHLIGHT` |
| Analytics | `SELECT agg ... GROUP BY`, `WHERE`, `HAVING` |
| Functions | scalar functions (`lower`, `length`, `date_trunc`, …) and `AS` aliases |
| Views | `CREATE MATERIALIZED VIEW`, `REFRESH`, `DROP` |

## Result shapes

* Retrieval `SELECT` → ranked ids/scores (`SearchResults` in Python)
* `GROUP BY` / aggregates → tabular analytics
* DDL / `DESCRIBE` → text message

## Pages

* [DDL](/api-reference/sql/ddl)
* [Retrieval](/api-reference/sql/retrieval)
* [Functions & aliases](/api-reference/sql/functions)
* [Analytics](/api-reference/sql/analytics)
* [Materialized views](/api-reference/sql/materialized-views)

Tutorial: [SQL guide](/guides/sql).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.