DuneSQL stands out as a specialized query engine crafted for blockchain data analytics, deriving its foundation from the TrinoSQL engine but with significant enhancements for blockchain-specific demands.

Functions and Operators

DuneSQL extends a comprehensive suite of functions and operators facilitating a broad spectrum of operations on data, including arithmetic operations, string manipulation, and date-time computations, tailored to blockchain analytics needs.

Data Types

With support for standard data types and unique blockchain-specific types like varbinary for addresses and hashes, along with int256 and uint256 for large numeric values, DuneSQL is adept at handling the intricacies of blockchain data.

SQL Statement Syntax

Adhering to standard SQL syntax with clauses like SELECT, FROM, WHERE, DuneSQL enables complex queries for data retrieval and analysis while restricting data modification operations to preserve database integrity.

Reserved Keywords

DuneSQL designates specific reserved keywords for internal functions, ensuring these are not used as identifiers, thus maintaining the engine’s operational integrity.

Querying Capabilities

Although DuneSQL limits data modification commands to safeguard data integrity, it offers innovative solutions like query queries for creating views and tables, enhancing data analysis flexibility.