Skip to main content
Get Started
Documentation

SQL dialect notes for Tractorscope

Tractorscope sends chart queries to the database selected for the chart. SQL syntax must match that database.

MySQL and SingleStore

MySQL-style databases commonly use backticks for reserved words and identifiers with spaces. Use MySQL date functions and aggregate functions when querying MySQL or compatible engines.

Postgres

Postgres uses double quotes for quoted identifiers and has its own date, interval, and casting syntax. Be careful when moving MySQL queries to Postgres.

BigQuery

BigQuery uses Standard SQL and often references tables with project and dataset names. BigQuery also has specific date, timestamp, and struct syntax.

MotherDuck

MotherDuck is based on DuckDB behavior. Confirm date functions, quoting, and file/table naming conventions when writing chart queries.

Turso / LibSQL

Turso and LibSQL are SQLite-compatible. Use SQLite-style functions and syntax.

General guidance

  • Write queries for the selected database type.
  • Use aliases for readable chart fields.
  • Test queries in the chart editor.
  • Use database-specific date functions carefully.
  • Quote reserved words using the correct dialect.

Related docs