Data Querying
Query data in a VeloDB Cloud warehouse with SQL. Use joins, aggregations, window functions, and complex-type functions to analyze your data. Choose a topic below to check syntax, compatibility, and feature requirements.
SQL compatibility
Multi-table joins
Joins (JOIN)
Choose join types and compare Broadcast, Shuffle, Bucket Shuffle, and Colocate data distribution strategies.
ASOF JOIN for Time-Series Nearest Match
For each row in the left table, find the nearest row in the right table along a time direction, enabling time-series alignment without window functions.
Subqueries
Check syntax, restrictions, and Mark Join handling for scalar, non-scalar, correlated, and uncorrelated subqueries.
Common Table Expressions (CTE)
Define temporary result sets with the WITH clause, with support for nested and recursive CTEs, suitable for hierarchy traversal, graph traversal, and similar scenarios.
Aggregation and analytics
Multi-Dimensional Aggregation Analytics
Use ROLLUP, CUBE, and GROUPING SETS to perform multi-dimensional aggregation analytics in a single SQL statement.
Analytic Functions (Window Functions)
Use the OVER clause to partition and window result sets, supporting ranking, cumulative sums, moving averages, year-over-year and quarter-over-quarter comparisons, and more.
Semi-structured and complex data
Querying Complex Types
Query complex types such as Array, Map, Struct, and JSON, and process semi-structured data with dedicated SQL functions.
Column-to-Row (Lateral View)
Use LATERAL VIEW with generator functions such as EXPLODE to expand a single row into multiple rows, enabling column-to-row SQL queries.
User-defined functions (UDF)
Java UDF / UDAF / UDWF / UDTF
Create Java functions for BYOC warehouses. Check deployment requirements, type mappings, registration syntax, and examples.
Alias Functions
Register a new signature for a function or expression fragment with CREATE ALIAS FUNCTION to improve migration compatibility and simplify writing complex queries.