Statements
This section covers SQL statements and clauses supported by Opteryx. Click on any topic below for detailed syntax, examples, and usage notes.
Query Clauses
The following clauses are used to construct SQL queries for retrieving and transforming data:
| Clause | Purpose |
|---|---|
| SELECT | Specify columns and expressions to retrieve |
| WHERE | Filter rows based on conditions |
| GROUP BY | Group rows by one or more columns for aggregation |
| HAVING | Filter groups after aggregation |
| ORDER BY | Sort results by one or more columns |
| LIMIT / OFFSET | Paginate results |
| WITH (CTE) | Define named subqueries (Common Table Expressions) |
| DISTINCT | Remove duplicate rows from results |
Set Operations
Combine results from multiple queries:
| Operation | Purpose |
|---|---|
| UNION / INTERSECT / EXCEPT | Combine, intersect, or find differences between result sets |
Data Modification
Statements for inserting, updating, and deleting data:
| Statement | Purpose |
|---|---|
| INSERT | Add new rows to a table |
| UPDATE | Modify existing rows |
| DELETE | Remove rows from a table |
Query Analysis
Understand and optimize query execution:
| Statement | Purpose |
|---|---|
| EXPLAIN | Display query plans and execution metrics |
View Management
Create and manage views:
| Statement | Purpose |
|---|---|
| CREATE VIEW | Create a new named view |
| ALTER VIEW | Modify an existing view definition |
| DROP VIEW | Remove a view |
Table Management
Manage table properties and statistics:
| Statement | Purpose |
|---|---|
| ANALYZE TABLE | Collect statistics for query optimization |
| COMMENT | Add descriptive comments to tables and views |
Advanced Features
Special clauses and time-based queries:
| Feature | Purpose |
|---|---|
| AT (Time Travel) | Query data as it existed at a specific point in time |
JOIN Operations
For detailed information on joining tables, see the Joins reference page.
... (truncated)