Back to Mindsdb

Standard Functions

docs/mindsdb_sql/functions/standard-functions.mdx

26.1.05.6 KB
Original Source

MindsDB supports standard SQL functions via DuckDB and MySQL engines.

DuckDB Functions

MindsDB executes functions on the underlying DuckDB engine. Therefore, all DuckDB functions are supported within MindsDB out of the box.

MySQL Functions

MindsDB executes MySQL-style functions on the underlying DuckDB engine. The following functions have been adapted to MySQL-style functions.

String functions:

Date and time functions:

  • ADDDATE
  • <Tooltip tip="The first argument can be either date or datetime, while the second argument must be a time interval in the MySQL format.">ADDTIME</Tooltip>
  • <Tooltip tip="DuckDB does not recognize time zones provided in digital offset formats like +10:00. Using CONVERT_TZ with these formats may result in errors or unexpected behavior.">CONVERT_TZ</Tooltip>
  • CURDATE
  • CURTIME
  • DATE_ADD
  • <Tooltip tip="There may be issues with week numbers at year boundaries when using the %u and %V specifiers. DuckDB does not provide exact alternatives with the same behavior, so results might differ or be inconsistent in those edge cases.">DATE_FORMAT</Tooltip>
  • DATE_SUB
  • DATEDIFF
  • DAYNAME
  • DAYOFMONTH
  • DAYOFWEEK
  • DAYOFYEAR
  • EXTRACT
  • FROM_DAYS
  • FROM_UNIXTIME
  • <Tooltip tip="Both argument must be constant values.">GET_FORMAT</Tooltip>
  • TIMESTAMPDIFF

Other functions: