bt sql opens an interactive editor with query history. Pass a query directly or pipe from stdin for scripting.
Interactive controls
| Key | Action |
|---|---|
↑ / ↓ | Navigate query history |
Enter | Execute query |
Ctrl+c | Clear input |
Ctrl+l | Clear output |
Ctrl+d / Esc | Exit |
Query syntax
- A
FROMclause is required (project_logs(...),experiment(...),dataset(...)) - Prefer filtering with
WHERE; useHAVINGonly after aggregation - Joins, subqueries, unions, and window functions are not supported
- Use explicit column aliases and type casts for clarity
- Paginate large results with
OFFSET '<cursor_token>'