Documentation

SQL Engine

Dialect

Altertable uses the DuckDB SQL dialect for all queries. If you're familiar with PostgreSQL or SQLite, you'll feel right at home.

Example query:

SELECT
user_id,
COUNT(*) AS sessions
FROM altertable.main.web_sessions
WHERE started_at >= date_trunc('week', now())
GROUP BY user_id
ORDER BY sessions DESC
LIMIT 10;

For complete syntax reference, see the DuckDB SQL Documentation.

Data Types

Altertable supports the same data types as DuckDB, including:

  • Numeric types: INTEGER, BIGINT, DOUBLE, DECIMAL, HUGEINT
  • Text types: VARCHAR, TEXT
  • Temporal types: DATE, TIMESTAMP, TIMESTAMPTZ, TIME, INTERVAL
  • Binary types: BLOB, BITSTRING
  • Boolean type: BOOLEAN
  • Nested types: ARRAY, LIST, MAP, STRUCT, UNION
  • Special types: UUID, JSON

For a complete list of supported data types and their specifications, see the DuckDB Data Types Overview.

Federated Queries

Connect multiple data sources — from BigQuery to Postgres databases — within the same SQL namespace. Query and join across them seamlessly:

SELECT
u.email,
b.total_revenue
FROM pg_production.users u
JOIN bigquery.revenue b
ON u.id = b.user_id;

The engine handles cross-database federation automatically, optimizing query execution across your connected sources.

Crafted with <3 by former Algolia × Front × Sorare builders© 2025 AltertableTermsPrivacySecurityCookies