Hello, World!

FeatureQL looks like SQL but works differently: you define features (named values) instead of selecting from tables. This page walks through the basics with interactive examples.

Returning values

The simplest query returns a literal value, just like SELECT 1 in SQL:

FeatureQL
SELECT 'Hello, World !'
Result
?_0 VARCHAR
Hello, World !

Naming features

Give a name to a value and it becomes a feature — a reusable building block you can reference elsewhere in the query or persist for use across queries:

FeatureQL
SELECT
    'Hello, World !' as HELLO,
    3 AS VALUE3
Result
HELLO VARCHARVALUE3 BIGINT
Hello, World !3

Computing values

Features can be computed from operators and functions. Here, string concatenation is shown two ways — the || operator and the CONCAT() function — both produce the same result:

FeatureQL
SELECT
    'Hello, ' || 'World' || '!',  -- Using the operator concat
    CONCAT('Hello, ', 'World', '!')  -- Using the function CONCAT
Result
?_0 VARCHAR?_1 VARCHAR
Hello, World!Hello, World!

Referencing other features

Features can reference other features defined in the same query. No CTEs, no subqueries — just name a feature and use it. FeatureQL resolves the dependency graph automatically:

FeatureQL
SELECT
    'World' as NAME,
    'Hello, ' || NAME || '!' as HELLO_NAME,
    1 AS VALUE1,
    VALUE1 + 2 AS VALUE_1_PLUS_2
Result
NAME VARCHARHELLO_NAME VARCHARVALUE1 BIGINTVALUE_1_PLUS_2 BIGINT
WorldHello, World!13

Notice that HELLO_NAME references NAME, and VALUE_1_PLUS_2 references VALUE1. The order you write them doesn't matter — FeatureQL figures out the evaluation order.

Case insensitivity

Keywords, feature names, and function names are all case insensitive:

FeatureQL
SeLeCt
    'World' As NaMe,
    'Hello, ' || nAmE || '!',
    vAlUe1 + 2,
    1 aS VaLuE1
Result
NAME VARCHAR?_1 VARCHAR?_2 BIGINTVALUE1 BIGINT
WorldHello, World!31

SeLeCt, As, nAmE — it all works. Use whatever casing convention your team prefers.

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19