Query with SQL Explorer
SQL Explorer is the in-app workspace for writing and running ad-hoc SQL against Altertable. Use it when you want to inspect tables, test joins, debug a query, or turn an exploration into a saved analysis.
Queries use the same DuckDB SQL dialect as the rest of the lakehouse. You can reference managed Altertable catalogs and external catalogs in one statement.
Example
Join product usage to account data from another catalog:
SELECTaccounts.name,COUNT(*) AS sessionsFROM product_analytics.analytics.web_sessions sessionsJOIN crm.public.accounts accountsON sessions.account_id = accounts.idWHERE sessions.started_at >= now() - INTERVAL '7 days'GROUP BY accounts.nameORDER BY sessions DESCLIMIT 20;
When to use it
Use SQL Explorer for fast iteration and one-off checks. Use SQL insights when the query should become a saved visualization, and use the HTTP API when application code needs to run queries programmatically.
Learn more
- SQL engine: DuckDB dialect and cross-catalog queries.
- Insights: save SQL as reusable analyses.
- HTTP API: run SQL from scripts and applications.