Top rows per partition
select region, store_id, amount
from sales.parquet
qualify row_number() over (
partition by region
order by amount desc, store_id asc
) <= 3
A tiny TypeScript read core — small enough for Cloudflare Workers and the edge, where DuckDB-WASM and JVM engines are too heavy. It either reads correctly or rejects precisely.
npm install lakeql
window examples
select region, store_id, amount
from sales.parquet
qualify row_number() over (
partition by region
order by amount desc, store_id asc
) <= 3
select region, store_id, amount,
sum(amount) over (
partition by region
order by amount asc
rows between 2 preceding and current row
) as moving_amount
from sales.parquet
select account, id, amount,
sum(amount) over (
partition by account
order by event_ts
range between interval '1 day' preceding
and current row
) as day_amount
from window_events.parquet
Every adapter fetches byte ranges. The gauges above show real bytes
pulled and HTTP requests issued — watch a limit or a
where prune the scan.
The same plan runs from SQL, the fluent builder, or a versioned JSON query. Pick whichever fits the layer you're building.
Unsupported table features throw a typed LakeqlError with a
stable code instead of returning quietly wrong rows.