blob: 9116dc04c416e41c9e00790c09b6c873fe3acc43 [file] [log] [blame]
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>All Druid SQL functions ยท Apache Druid</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="canonical" href="https://druid.apache.org/docs/24.0.1/querying/sql-functions.html"/><meta name="generator" content="Docusaurus"/><meta name="description" content="&lt;!--"/><meta name="docsearch:language" content="en"/><meta name="docsearch:version" content="24.0.1" /><meta property="og:title" content="All Druid SQL functions ยท Apache Druid"/><meta property="og:type" content="website"/><meta property="og:url" content="https://druid.apache.org/index.html"/><meta property="og:description" content="&lt;!--"/><meta property="og:image" content="https://druid.apache.org/img/druid_nav.png"/><meta name="twitter:card" content="summary"/><meta name="twitter:image" content="https://druid.apache.org/img/druid_nav.png"/><link rel="shortcut icon" href="/img/favicon.png"/><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-131010415-1"></script><script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-131010415-1');
</script><link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"/><link rel="stylesheet" href="/css/code-block-buttons.css"/><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script><script type="text/javascript" src="/js/code-block-buttons.js"></script><script src="/js/scrollSpy.js"></script><link rel="stylesheet" href="/css/main.css"/><script src="/js/codetabs.js"></script></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/"><img class="logo" src="/img/druid_nav.png" alt="Apache Druid"/></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/technology" target="_self">Technology</a></li><li class=""><a href="/use-cases" target="_self">Use Cases</a></li><li class=""><a href="/druid-powered" target="_self">Powered By</a></li><li class="siteNavGroupActive"><a href="/docs/24.0.1/design/index.html" target="_self">Docs</a></li><li class=""><a href="/community/" target="_self">Community</a></li><li class=""><a href="https://www.apache.org" target="_self">Apache</a></li><li class=""><a href="/downloads.html" target="_self">Download</a></li><li class="navSearchWrapper reactNavSearchWrapper"><input type="text" id="search_input_react" placeholder="Search" title="Search"/></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><div class="hamburger-menu"><div class="line1"></div><div class="line2"></div><div class="line3"></div></div></div><h2><i>โ€บ</i><span>Druid SQL</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Getting started<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/index.html">Introduction to Apache Druid</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/index.html">Quickstart (local)</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/single-server.html">Single server deployment</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/cluster.html">Clustered deployment</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Tutorials<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-batch.html">Load files natively</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-msq-extern.html">Load files using SQL ๐Ÿ†•</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-kafka.html">Load from Apache Kafka</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-batch-hadoop.html">Load from Apache Hadoop</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-query.html">Querying data</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-rollup.html">Roll-up</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-sketches-theta.html">Theta sketches</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-retention.html">Configuring data retention</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-update-data.html">Updating existing data</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-compaction.html">Compacting segments</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-delete-data.html">Deleting data</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-ingestion-spec.html">Writing an ingestion spec</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-transform-spec.html">Transforming input data</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/docker.html">Tutorial: Run with Docker</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-kerberos-hadoop.html">Kerberized HDFS deep storage</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/tutorials/tutorial-msq-convert-spec.html">Convert ingestion spec to SQL</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Design<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/architecture.html">Design</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/segments.html">Segments</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/processes.html">Processes and servers</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/dependencies/deep-storage.html">Deep storage</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/dependencies/metadata-storage.html">Metadata storage</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/dependencies/zookeeper.html">ZooKeeper</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Ingestion<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/index.html">Ingestion</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/data-formats.html">Data formats</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/data-model.html">Data model</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/rollup.html">Data rollup</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/partitioning.html">Partitioning</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/ingestion-spec.html">Ingestion spec</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/schema-design.html">Schema design tips</a></li><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Stream ingestion</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/kafka-ingestion.html">Apache Kafka ingestion</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/kafka-supervisor-reference.html">Apache Kafka supervisor</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/kafka-supervisor-operations.html">Apache Kafka operations</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/kinesis-ingestion.html">Amazon Kinesis</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Batch ingestion</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/native-batch.html">Native batch</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/native-batch-input-sources.html">Native batch: input sources</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/hadoop.html">Hadoop-based</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">SQL-based ingestion ๐Ÿ†•</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/multi-stage-query/index.html">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/multi-stage-query/concepts.html">Key concepts</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/multi-stage-query/api.html">API</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/multi-stage-query/security.html">Security</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/multi-stage-query/examples.html">Examples</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/multi-stage-query/reference.html">Reference</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/multi-stage-query/known-issues.html">Known issues</a></li></ul></div><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/tasks.html">Task reference</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/faq.html">Troubleshooting FAQ</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Data management<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/24.0.1/data-management/index.html">Overview</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/data-management/update.html">Data updates</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/data-management/delete.html">Data deletion</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/data-management/schema-changes.html">Schema changes</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/data-management/compaction.html">Compaction</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/data-management/automatic-compaction.html">Automatic compaction</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Querying<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Druid SQL</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql.html">Overview and syntax</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-data-types.html">SQL data types</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-operators.html">Operators</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-scalar.html">Scalar functions</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation functions</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string functions</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-json-functions.html">JSON functions</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/docs/24.0.1/querying/sql-functions.html">All functions</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-api.html">Druid SQL API</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-jdbc.html">JDBC driver API</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-query-context.html">SQL query context</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-metadata-tables.html">SQL metadata tables</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sql-translation.html">SQL query translation</a></li></ul></div><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/querying.html">Native queries</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/query-execution.html">Query execution</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/troubleshooting.html">Troubleshooting</a></li><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Concepts</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/datasource.html">Datasources</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/joins.html">Joins</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/lookups.html">Lookups</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/multi-value-dimensions.html">Multi-value dimensions</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/nested-columns.html">Nested columns</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/multitenancy.html">Multitenancy</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/caching.html">Query caching</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/using-caching.html">Using query caching</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/query-context.html">Query context</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Native query types</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/timeseriesquery.html">Timeseries</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/topnquery.html">TopN</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/groupbyquery.html">GroupBy</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/scan-query.html">Scan</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/searchquery.html">Search</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/timeboundaryquery.html">TimeBoundary</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/segmentmetadataquery.html">SegmentMetadata</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/datasourcemetadataquery.html">DatasourceMetadata</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Native query components</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/filters.html">Filters</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/granularities.html">Granularities</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/dimensionspecs.html">Dimensions</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/aggregations.html">Aggregations</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/post-aggregations.html">Post-aggregations</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/misc/math-expr.html">Expressions</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/having.html">Having filters (groupBy)</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/limitspec.html">Sorting and limiting (groupBy)</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/topnmetricspec.html">Sorting (topN)</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/sorting-orders.html">String comparators</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/virtual-columns.html">Virtual columns</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/geo.html">Spatial filters</a></li></ul></div></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Configuration<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/24.0.1/configuration/index.html">Configuration reference</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions.html">Extensions</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/configuration/logging.html">Logging</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Operations<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/web-console.html">Web console</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/java.html">Java runtime</a></li><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Security</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/security-overview.html">Security overview</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/security-user-auth.html">User authentication and authorization</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/auth-ldap.html">LDAP auth</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/password-provider.html">Password providers</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/dynamic-config-provider.html">Dynamic Config Providers</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/tls-support.html">TLS support</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Performance tuning</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/basic-cluster-tuning.html">Basic cluster tuning</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/segment-optimization.html">Segment size optimization</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/mixed-workloads.html">Mixed workloads</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/http-compression.html">HTTP compression</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/clean-metadata-store.html">Automated metadata cleanup</a></li></ul></div><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Monitoring</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/request-logging.html">Request logging</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/metrics.html">Metrics</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/alerts.html">Alerts</a></li></ul></div><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/api-reference.html">API reference</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/high-availability.html">High availability</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/rolling-updates.html">Rolling updates</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/rule-configuration.html">Retaining or automatically dropping data</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/other-hadoop.html">Working with different versions of Apache Hadoop</a></li><div class="navGroup subNavGroup"><h4 class="navGroupSubcategoryTitle">Misc</h4><ul><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/dump-segment.html">dump-segment tool</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/reset-cluster.html">reset-cluster tool</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/insert-segment-to-db.html">insert-segment-to-db tool</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/pull-deps.html">pull-deps tool</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/deep-storage-migration.html">Deep storage migration</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/export-metadata.html">Export Metadata Tool</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/metadata-migration.html">Metadata Migration</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/use_sbt_to_build_fat_jar.html">Content for build.sbt</a></li></ul></div></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Development<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/overview.html">Developing on Druid</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/modules.html">Creating extensions</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/javascript.html">JavaScript functionality</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/build.html">Build from source</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/versioning.html">Versioning</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/experimental.html">Experimental features</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Misc<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/24.0.1/misc/papers-and-talks.html">Papers</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle collapsible">Hidden<span class="arrow"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#565656" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg></span></h3><ul class="hide"><li class="navListItem"><a class="navItem" href="/docs/24.0.1/comparisons/druid-vs-elasticsearch.html">Apache Druid vs Elasticsearch</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/comparisons/druid-vs-key-value.html">Apache Druid vs. Key/Value Stores (HBase/Cassandra/OpenTSDB)</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/comparisons/druid-vs-kudu.html">Apache Druid vs Kudu</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/comparisons/druid-vs-redshift.html">Apache Druid vs Redshift</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/comparisons/druid-vs-spark.html">Apache Druid vs Spark</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/comparisons/druid-vs-sql-on-hadoop.html">Apache Druid vs SQL-on-Hadoop</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/auth.html">Authentication and Authorization</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/broker.html">Broker</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/coordinator.html">Coordinator Process</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/historical.html">Historical Process</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/indexer.html">Indexer Process</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/indexing-service.html">Indexing Service</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/middlemanager.html">MiddleManager Process</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/overlord.html">Overlord Process</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/router.html">Router Process</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/design/peons.html">Peons</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/approximate-histograms.html">Approximate Histogram aggregators</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/avro.html">Apache Avro</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/azure.html">Microsoft Azure</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/bloom-filter.html">Bloom Filter</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/datasketches-extension.html">DataSketches extension</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/datasketches-hll.html">DataSketches HLL Sketch module</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/datasketches-quantiles.html">DataSketches Quantiles Sketch module</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/datasketches-theta.html">DataSketches Theta Sketch module</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/datasketches-tuple.html">DataSketches Tuple Sketch module</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/druid-basic-security.html">Basic Security</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/druid-kerberos.html">Kerberos</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/druid-lookups.html">Cached Lookup Module</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/druid-ranger-security.html">Apache Ranger Security</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/google.html">Google Cloud Storage</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/hdfs.html">HDFS</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/kafka-extraction-namespace.html">Apache Kafka Lookups</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/lookups-cached-global.html">Globally Cached Lookups</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/mysql.html">MySQL Metadata Store</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/orc.html">ORC Extension</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/druid-pac4j.html">Druid pac4j based Security extension</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/parquet.html">Apache Parquet Extension</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/postgresql.html">PostgreSQL Metadata Store</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/protobuf.html">Protobuf</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/s3.html">S3-compatible</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/simple-client-sslcontext.html">Simple SSLContext Provider Module</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/stats.html">Stats aggregator</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/test-stats.html">Test Stats Aggregators</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/druid-aws-rds.html">Druid AWS RDS Module</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-core/kubernetes.html">Kubernetes</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/ambari-metrics-emitter.html">Ambari Metrics Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/cassandra.html">Apache Cassandra</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/cloudfiles.html">Rackspace Cloud Files</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/distinctcount.html">DistinctCount Aggregator</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/graphite.html">Graphite Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/influx.html">InfluxDB Line Protocol Parser</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/influxdb-emitter.html">InfluxDB Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/kafka-emitter.html">Kafka Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/materialized-view.html">Materialized View</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/momentsketch-quantiles.html">Moment Sketches for Approximate Quantiles module</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/moving-average-query.html">Moving Average Query</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/opentsdb-emitter.html">OpenTSDB Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/redis-cache.html">Druid Redis Cache</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/sqlserver.html">Microsoft SQLServer</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/statsd.html">StatsD Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/tdigestsketch-quantiles.html">T-Digest Quantiles Sketch module</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/thrift.html">Thrift</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/time-min-max.html">Timestamp Min/Max aggregators</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/gce-extensions.html">GCE Extensions</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/aliyun-oss.html">Aliyun OSS</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/development/extensions-contrib/prometheus.html">Prometheus Emitter</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/operations/kubernetes.html">kubernetes</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/hll-old.html">Cardinality/HyperUnique aggregators</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/querying/select-query.html">Select</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/native-batch-firehose.html">Firehose (deprecated)</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/native-batch-simple-task.html">Native batch (simple)</a></li><li class="navListItem"><a class="navItem" href="/docs/24.0.1/ingestion/standalone-realtime.html">Realtime Process</a></li></ul></div></div></section></div><script>
var coll = document.getElementsByClassName('collapsible');
var checkActiveCategory = true;
for (var i = 0; i < coll.length; i++) {
var links = coll[i].nextElementSibling.getElementsByTagName('*');
if (checkActiveCategory){
for (var j = 0; j < links.length; j++) {
if (links[j].classList.contains('navListItemActive')){
coll[i].nextElementSibling.classList.toggle('hide');
coll[i].childNodes[1].classList.toggle('rotate');
checkActiveCategory = false;
break;
}
}
}
coll[i].addEventListener('click', function() {
var arrow = this.childNodes[1];
arrow.classList.toggle('rotate');
var content = this.nextElementSibling;
content.classList.toggle('hide');
});
}
document.addEventListener('DOMContentLoaded', function() {
createToggler('#navToggler', '#docsNav', 'docsSliderActive');
createToggler('#tocToggler', 'body', 'tocActive');
var headings = document.querySelector('.toc-headings');
headings && headings.addEventListener('click', function(event) {
var el = event.target;
while(el !== headings){
if (el.tagName === 'A') {
document.body.classList.remove('tocActive');
break;
} else{
el = el.parentNode;
}
}
}, false);
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
if (!toggler) {
return;
}
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><div class="container mainContainer docsContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://github.com/apache/druid/edit/master/docs/querying/sql-functions.md" target="_blank" rel="noreferrer noopener">Edit</a><h1 id="__docusaurus" class="postHeaderTitle">All Druid SQL functions</h1></header><article><div><span><!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<blockquote>
<p>Apache Druid supports two query languages: Druid SQL and <a href="/docs/24.0.1/querying/querying.html">native queries</a>.
This document describes the SQL language.</p>
</blockquote>
<p>This page provides a reference of all Druid SQL functions in alphabetical order.
Click the linked function type for documentation on a particular function.</p>
<h2><a class="anchor" aria-hidden="true" id="abs"></a><a href="#abs" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ABS</h2>
<p><code>ABS(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the absolute value of a numeric expression.</p>
<h2><a class="anchor" aria-hidden="true" id="acos"></a><a href="#acos" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ACOS</h2>
<p><code>ACOS(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the arc cosine of a numeric expression.</p>
<h2><a class="anchor" aria-hidden="true" id="any_value"></a><a href="#any_value" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ANY_VALUE</h2>
<p><code>ANY_VALUE(&lt;NUMERIC&gt;)</code></p>
<p><code>ANY_VALUE(&lt;BOOLEAN&gt;)</code></p>
<p><code>ANY_VALUE(&lt;CHARACTER&gt;, &lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Returns any value of the specified expression.</p>
<h2><a class="anchor" aria-hidden="true" id="approx_count_distinct"></a><a href="#approx_count_distinct" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>APPROX_COUNT_DISTINCT</h2>
<p><code>APPROX_COUNT_DISTINCT(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Counts distinct values of a regular column or a prebuilt sketch column.</p>
<p><code>APPROX_COUNT_DISTINCT_BUILTIN(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Counts distinct values of a string, numeric, or <code>hyperUnique</code> column using Druid's built-in <code>cardinality</code> or <code>hyperUnique</code> aggregators.</p>
<h2><a class="anchor" aria-hidden="true" id="approx_count_distinct_ds_hll"></a><a href="#approx_count_distinct_ds_hll" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>APPROX_COUNT_DISTINCT_DS_HLL</h2>
<p><code>APPROX_COUNT_DISTINCT_DS_HLL(expr, [&lt;NUMERIC&gt;, &lt;CHARACTER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Counts distinct values of an HLL sketch column or a regular column.</p>
<h2><a class="anchor" aria-hidden="true" id="approx_count_distinct_ds_theta"></a><a href="#approx_count_distinct_ds_theta" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>APPROX_COUNT_DISTINCT_DS_THETA</h2>
<p><code>APPROX_COUNT_DISTINCT_DS_THETA(expr, [&lt;NUMERIC&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Counts distinct values of a Theta sketch column or a regular column.</p>
<h2><a class="anchor" aria-hidden="true" id="approx_quantile"></a><a href="#approx_quantile" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>APPROX_QUANTILE</h2>
<p><code>APPROX_QUANTILE(expr, &lt;NUMERIC&gt;, [&lt;NUMERIC&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Deprecated in favor of <code>APPROX_QUANTILE_DS</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="approx_quantile_ds"></a><a href="#approx_quantile_ds" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>APPROX_QUANTILE_DS</h2>
<p><code>APPROX_QUANTILE_DS(expr, &lt;NUMERIC&gt;, [&lt;NUMERIC&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Computes approximate quantiles on a Quantiles sketch column or a regular numeric column.</p>
<h2><a class="anchor" aria-hidden="true" id="approx_quantile_fixed_buckets"></a><a href="#approx_quantile_fixed_buckets" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>APPROX_QUANTILE_FIXED_BUCKETS</h2>
<p><code>APPROX_QUANTILE_FIXED_BUCKETS(expr, &lt;NUMERIC&gt;, &lt;NUMERIC&gt;, &lt;NUMERIC&gt;, &lt;NUMERIC&gt;, [&lt;CHARACTER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Computes approximate quantiles on fixed buckets histogram column or a regular numeric column.</p>
<h2><a class="anchor" aria-hidden="true" id="array"></a><a href="#array" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ARRAY[]</h2>
<p><code>ARRAY[expr1, expr2, ...]</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Constructs a SQL ARRAY literal from the expression arguments. The arguments must be of the same type.</p>
<h2><a class="anchor" aria-hidden="true" id="array_agg"></a><a href="#array_agg" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ARRAY_AGG</h2>
<p><code>ARRAY_AGG([DISTINCT] expr, [&lt;NUMERIC&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Returns an array of all values of the specified expression.</p>
<h2><a class="anchor" aria-hidden="true" id="array_concat_agg"></a><a href="#array_concat_agg" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ARRAY_CONCAT_AGG</h2>
<p><code>ARRAY_CONCAT_AGG([DISTINCT] expr, [&lt;NUMERIC&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Concatenates array inputs into a single array.</p>
<h2><a class="anchor" aria-hidden="true" id="asin"></a><a href="#asin" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ASIN</h2>
<p><code>ASIN(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the arc sine of a numeric expression.</p>
<h2><a class="anchor" aria-hidden="true" id="atan"></a><a href="#atan" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ATAN</h2>
<p><code>ATAN(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the arc tangent of a numeric expression.</p>
<h2><a class="anchor" aria-hidden="true" id="atan2"></a><a href="#atan2" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ATAN2</h2>
<p><code>ATAN2(&lt;NUMERIC&gt;, &lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the arc tangent of the two arguments.</p>
<h2><a class="anchor" aria-hidden="true" id="avg"></a><a href="#avg" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>AVG</h2>
<p><code>AVG(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Calculates the average of a set of values.</p>
<h2><a class="anchor" aria-hidden="true" id="bit_and"></a><a href="#bit_and" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BIT_AND</h2>
<p><code>BIT_AND(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Performs a bitwise AND operation on all input values.</p>
<h2><a class="anchor" aria-hidden="true" id="bit_or"></a><a href="#bit_or" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BIT_OR</h2>
<p><code>BIT_OR(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Performs a bitwise OR operation on all input values.</p>
<h2><a class="anchor" aria-hidden="true" id="bit_xor"></a><a href="#bit_xor" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BIT_XOR</h2>
<p><code>BIT_XOR(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Performs a bitwise XOR operation on all input values.</p>
<h2><a class="anchor" aria-hidden="true" id="bitwise_and"></a><a href="#bitwise_and" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BITWISE_AND</h2>
<p><code>BITWISE_AND(expr1, expr2)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Returns the bitwise AND between the two expressions, that is, <code>expr1 &amp; expr2</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="bitwise_complement"></a><a href="#bitwise_complement" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BITWISE_COMPLEMENT</h2>
<p><code>BITWISE_COMPLEMENT(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Returns the bitwise NOT for the expression, that is, <code>~expr</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="bitwise_convert_double_to_long_bits"></a><a href="#bitwise_convert_double_to_long_bits" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BITWISE_CONVERT_DOUBLE_TO_LONG_BITS</h2>
<p><code>BITWISE_CONVERT_DOUBLE_TO_LONG_BITS(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Converts the bits of an IEEE 754 floating-point double value to a long.</p>
<h2><a class="anchor" aria-hidden="true" id="bitwise_convert_long_bits_to_double"></a><a href="#bitwise_convert_long_bits_to_double" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BITWISE_CONVERT_LONG_BITS_TO_DOUBLE</h2>
<p><code>BITWISE_CONVERT_LONG_BITS_TO_DOUBLE(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Converts a long to the IEEE 754 floating-point double specified by the bits stored in the long.</p>
<h2><a class="anchor" aria-hidden="true" id="bitwise_or"></a><a href="#bitwise_or" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BITWISE_OR</h2>
<p><code>BITWISE_OR(expr1, expr2)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Returns the bitwise OR between the two expressions, that is, <code>expr1 | expr2</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="bitwise_shift_left"></a><a href="#bitwise_shift_left" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BITWISE_SHIFT_LEFT</h2>
<p><code>BITWISE_SHIFT_LEFT(expr1, expr2)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Returns a bitwise left shift of expr1, that is, <code>expr1 &lt;&lt; expr2</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="bitwise_shift_right"></a><a href="#bitwise_shift_right" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BITWISE_SHIFT_RIGHT</h2>
<p><code>BITWISE_SHIFT_RIGHT(expr1, expr2)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Returns a bitwise right shift of expr1, that is, <code>expr1 &gt;&gt; expr2</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="bitwise_xor"></a><a href="#bitwise_xor" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BITWISE_XOR</h2>
<p><code>BITWISE_XOR(expr1, expr2)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Returns the bitwise exclusive OR between the two expressions, that is, <code>expr1 ^ expr2</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="bloom_filter"></a><a href="#bloom_filter" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BLOOM_FILTER</h2>
<p><code>BLOOM_FILTER(expr, &lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Computes a Bloom filter from values produced by the specified expression.</p>
<h2><a class="anchor" aria-hidden="true" id="bloom_filter_test"></a><a href="#bloom_filter_test" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BLOOM_FILTER_TEST</h2>
<p><code>BLOOM_FILTER_TEST(expr, &lt;STRING&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#other-scalar-functions">Scalar, other</a></p>
<p>Returns true if the expression is contained in a Base64-serialized Bloom filter.</p>
<h2><a class="anchor" aria-hidden="true" id="btrim"></a><a href="#btrim" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>BTRIM</h2>
<p><code>BTRIM(&lt;CHARACTER&gt;, [&lt;CHARACTER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Trims characters from both the leading and trailing ends of an expression.</p>
<h2><a class="anchor" aria-hidden="true" id="case"></a><a href="#case" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>CASE</h2>
<p><code>CASE expr WHEN value1 THEN result1 \[ WHEN value2 THEN result2 ... \] \[ ELSE resultN \] END</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#other-scalar-functions">Scalar, other</a></p>
<p>Returns a result based on a given condition.</p>
<h2><a class="anchor" aria-hidden="true" id="cast"></a><a href="#cast" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>CAST</h2>
<p><code>CAST(value AS TYPE)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#other-scalar-functions">Scalar, other</a></p>
<p>Converts a value into the specified data type.</p>
<h2><a class="anchor" aria-hidden="true" id="ceil-date-and-time"></a><a href="#ceil-date-and-time" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>CEIL (date and time)</h2>
<p><code>CEIL(&lt;TIMESTAMP&gt; TO &lt;TIME_UNIT&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Rounds up a timestamp by a given time unit.</p>
<h2><a class="anchor" aria-hidden="true" id="ceil-numeric"></a><a href="#ceil-numeric" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>CEIL (numeric)</h2>
<p><code>CEIL(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the smallest integer value greater than or equal to the numeric expression.</p>
<h2><a class="anchor" aria-hidden="true" id="char_length"></a><a href="#char_length" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>CHAR_LENGTH</h2>
<p><code>CHAR_LENGTH(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Alias for <a href="#length"><code>LENGTH</code></a>.</p>
<h2><a class="anchor" aria-hidden="true" id="character_length"></a><a href="#character_length" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>CHARACTER_LENGTH</h2>
<p><code>CHARACTER_LENGTH(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Alias for <a href="#length"><code>LENGTH</code></a>.</p>
<h2><a class="anchor" aria-hidden="true" id="coalesce"></a><a href="#coalesce" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>COALESCE</h2>
<p><code>COALESCE(expr, expr, ...)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#other-scalar-functions">Scalar, other</a></p>
<p>Returns the first non-null value.</p>
<h2><a class="anchor" aria-hidden="true" id="concat"></a><a href="#concat" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>CONCAT</h2>
<p><code>CONCAT(expr, expr...)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Concatenates a list of expressions.</p>
<h2><a class="anchor" aria-hidden="true" id="contains_string"></a><a href="#contains_string" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>CONTAINS_STRING</h2>
<p><code>CONTAINS_STRING(&lt;CHARACTER&gt;, &lt;CHARACTER&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Finds whether a string is in a given expression, case-sensitive.</p>
<h2><a class="anchor" aria-hidden="true" id="cos"></a><a href="#cos" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>COS</h2>
<p><code>COS(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the trigonometric cosine of an angle expressed in radians.</p>
<h2><a class="anchor" aria-hidden="true" id="cot"></a><a href="#cot" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>COT</h2>
<p><code>COT(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the trigonometric cotangent of an angle expressed in radians.</p>
<h2><a class="anchor" aria-hidden="true" id="count"></a><a href="#count" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>COUNT</h2>
<p><code>COUNT([DISTINCT] expr)</code></p>
<p><code>COUNT(*)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Counts the number of rows.</p>
<h2><a class="anchor" aria-hidden="true" id="current_date"></a><a href="#current_date" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>CURRENT_DATE</h2>
<p><code>CURRENT_DATE</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Returns the current date in the connection's time zone.</p>
<h2><a class="anchor" aria-hidden="true" id="current_timestamp"></a><a href="#current_timestamp" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>CURRENT_TIMESTAMP</h2>
<p><code>CURRENT_TIMESTAMP</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Returns the current timestamp in the connection's time zone.</p>
<h2><a class="anchor" aria-hidden="true" id="date_trunc"></a><a href="#date_trunc" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DATE_TRUNC</h2>
<p><code>DATE_TRUNC(&lt;CHARACTER&gt;, &lt;TIMESTAMP&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Rounds down a timestamp by a given time unit.</p>
<h2><a class="anchor" aria-hidden="true" id="degrees"></a><a href="#degrees" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DEGREES</h2>
<p><code>DEGREES(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Converts an angle from radians to degrees.</p>
<h2><a class="anchor" aria-hidden="true" id="div"></a><a href="#div" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DIV</h2>
<p><code>DIV(x, y)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Returns the result of integer division of <code>x</code> by <code>y</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="ds_cdf"></a><a href="#ds_cdf" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DS_CDF</h2>
<p><code>DS_CDF(expr, splitPoint0, splitPoint1, ...)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns a string representing an approximation to the Cumulative Distribution Function given the specified bin definition.</p>
<h2><a class="anchor" aria-hidden="true" id="ds_get_quantile"></a><a href="#ds_get_quantile" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DS_GET_QUANTILE</h2>
<p><code>DS_GET_QUANTILE(expr, fraction)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns the quantile estimate corresponding to <code>fraction</code> from a quantiles sketch.</p>
<h2><a class="anchor" aria-hidden="true" id="ds_get_quantiles"></a><a href="#ds_get_quantiles" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DS_GET_QUANTILES</h2>
<p><code>DS_GET_QUANTILES(expr, fraction0, fraction1, ...)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns a string representing an array of quantile estimates corresponding to a list of fractions from a quantiles sketch.</p>
<h2><a class="anchor" aria-hidden="true" id="ds_histogram"></a><a href="#ds_histogram" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DS_HISTOGRAM</h2>
<p><code>DS_HISTOGRAM(expr, splitPoint0, splitPoint1, ...)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns a string representing an approximation to the histogram given the specified bin definition.</p>
<h2><a class="anchor" aria-hidden="true" id="ds_hll"></a><a href="#ds_hll" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DS_HLL</h2>
<p><code>DS_HLL(expr, [lgK, tgtHllType])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Creates an HLL sketch on a column containing HLL sketches or a regular column.</p>
<h2><a class="anchor" aria-hidden="true" id="ds_quantile_summary"></a><a href="#ds_quantile_summary" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DS_QUANTILE_SUMMARY</h2>
<p><code>DS_QUANTILE_SUMMARY(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns a string summary of a quantiles sketch.</p>
<h2><a class="anchor" aria-hidden="true" id="ds_quantiles_sketch"></a><a href="#ds_quantiles_sketch" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DS_QUANTILES_SKETCH</h2>
<p><code>DS_QUANTILES_SKETCH(expr, [k])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Creates a Quantiles sketch on a column containing Quantiles sketches or a regular column.</p>
<h2><a class="anchor" aria-hidden="true" id="ds_rank"></a><a href="#ds_rank" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DS_RANK</h2>
<p><code>DS_RANK(expr, value)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns an approximate rank between 0 and 1 of a given value, in which the rank signifies the fraction of the distribution less than the given value.</p>
<h2><a class="anchor" aria-hidden="true" id="ds_theta"></a><a href="#ds_theta" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>DS_THETA</h2>
<p><code>DS_THETA(expr, [size])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Creates a Theta sketch on a column containing Theta sketches or a regular column.</p>
<h2><a class="anchor" aria-hidden="true" id="earliest"></a><a href="#earliest" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>EARLIEST</h2>
<p><code>EARLIEST(expr)</code></p>
<p><code>EARLIEST(expr, maxBytesPerString)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Returns the value of a numeric or string expression corresponding to the earliest <code>__time</code> value.</p>
<h2><a class="anchor" aria-hidden="true" id="earliest_by"></a><a href="#earliest_by" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>EARLIEST_BY</h2>
<p><code>EARLIEST_BY(expr, timestampExpr)</code></p>
<p><code>EARLIEST_BY(expr, timestampExpr, maxBytesPerString)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Returns the value of a numeric or string expression corresponding to the earliest time value from <code>timestampExpr</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="exp"></a><a href="#exp" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>EXP</h2>
<p><code>EXP(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates <em>e</em> raised to the power of the numeric expression.</p>
<h2><a class="anchor" aria-hidden="true" id="extract"></a><a href="#extract" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>EXTRACT</h2>
<p><code>EXTRACT(&lt;TIME_UNIT&gt; FROM &lt;TIMESTAMP&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Extracts the value of some unit of the timestamp, optionally from a certain time zone, and returns the number.</p>
<h2><a class="anchor" aria-hidden="true" id="floor-date-and-time"></a><a href="#floor-date-and-time" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>FLOOR (date and time)</h2>
<p><code>FLOOR(&lt;TIMESTAMP&gt; TO &lt;TIME_UNIT&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Rounds down a timestamp by a given time unit.</p>
<h2><a class="anchor" aria-hidden="true" id="floor-numeric"></a><a href="#floor-numeric" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>FLOOR (numeric)</h2>
<p><code>FLOOR(&lt;NUMERIC&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the largest integer value less than or equal to the numeric expression.</p>
<h2><a class="anchor" aria-hidden="true" id="greatest"></a><a href="#greatest" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>GREATEST</h2>
<p><code>GREATEST([expr1, ...])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#reduction-functions">Scalar, reduction</a></p>
<p>Returns the maximum value from the provided arguments.</p>
<h2><a class="anchor" aria-hidden="true" id="grouping"></a><a href="#grouping" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>GROUPING</h2>
<p><code>GROUPING(expr, expr...)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Returns a number for each output row of a groupBy query, indicating whether the specified dimension is included for that row.</p>
<h2><a class="anchor" aria-hidden="true" id="hll_sketch_estimate"></a><a href="#hll_sketch_estimate" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>HLL_SKETCH_ESTIMATE</h2>
<p><code>HLL_SKETCH_ESTIMATE(expr, [round])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns the distinct count estimate from an HLL sketch.</p>
<h2><a class="anchor" aria-hidden="true" id="hll_sketch_estimate_with_error_bounds"></a><a href="#hll_sketch_estimate_with_error_bounds" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>HLL_SKETCH_ESTIMATE_WITH_ERROR_BOUNDS</h2>
<p><code>HLL_SKETCH_ESTIMATE_WITH_ERROR_BOUNDS(expr, [numStdDev])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns the distinct count estimate and error bounds from an HLL sketch.</p>
<h2><a class="anchor" aria-hidden="true" id="hll_sketch_to_string"></a><a href="#hll_sketch_to_string" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>HLL_SKETCH_TO_STRING</h2>
<p><code>HLL_SKETCH_TO_STRING(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns a human-readable string representation of an HLL sketch.</p>
<h2><a class="anchor" aria-hidden="true" id="hll_sketch_union"></a><a href="#hll_sketch_union" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>HLL_SKETCH_UNION</h2>
<p><code>HLL_SKETCH_UNION([lgK, tgtHllType], expr0, expr1, ...)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns a union of HLL sketches.</p>
<h2><a class="anchor" aria-hidden="true" id="human_readable_binary_byte_format"></a><a href="#human_readable_binary_byte_format" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>HUMAN_READABLE_BINARY_BYTE_FORMAT</h2>
<p><code>HUMAN_READABLE_BINARY_BYTE_FORMAT(value[, precision])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Converts an integer byte size into human-readable IEC format.</p>
<h2><a class="anchor" aria-hidden="true" id="human_readable_decimal_byte_format"></a><a href="#human_readable_decimal_byte_format" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>HUMAN_READABLE_DECIMAL_BYTE_FORMAT</h2>
<p><code>HUMAN_READABLE_DECIMAL_BYTE_FORMAT(value[, precision])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Converts a byte size into human-readable SI format.</p>
<h2><a class="anchor" aria-hidden="true" id="human_readable_decimal_format"></a><a href="#human_readable_decimal_format" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>HUMAN_READABLE_DECIMAL_FORMAT</h2>
<p><code>HUMAN_READABLE_DECIMAL_FORMAT(value[, precision])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Converts a byte size into human-readable SI format with single-character units.</p>
<h2><a class="anchor" aria-hidden="true" id="icontains_string"></a><a href="#icontains_string" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ICONTAINS_STRING</h2>
<p><code>ICONTAINS_STRING(&lt;expr&gt;, str)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Finds whether a string is in a given expression, case-insensitive.</p>
<h2><a class="anchor" aria-hidden="true" id="ipv4_match"></a><a href="#ipv4_match" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>IPV4_MATCH</h2>
<p><code>IPV4_MATCH(address, subnet)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#ip-address-functions">Scalar, IP address</a></p>
<p>Returns true if the <code>address</code> belongs to the <code>subnet</code> literal, else false.</p>
<h2><a class="anchor" aria-hidden="true" id="ipv4_parse"></a><a href="#ipv4_parse" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>IPV4_PARSE</h2>
<p><code>IPV4_PARSE(address)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#ip-address-functions">Scalar, IP address</a></p>
<p>Parses <code>address</code> into an IPv4 address stored as an integer.</p>
<h2><a class="anchor" aria-hidden="true" id="ipv4_stringify"></a><a href="#ipv4_stringify" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>IPV4_STRINGIFY</h2>
<p><code>IPV4_STRINGIFY(address)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#ip-address-functions">Scalar, IP address</a></p>
<p>Converts <code>address</code> into an IPv4 address in dot-decimal notation.</p>
<h2><a class="anchor" aria-hidden="true" id="json_keys"></a><a href="#json_keys" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>JSON_KEYS</h2>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-json-functions.html">JSON</a></p>
<p><code>JSON_KEYS(expr, path)</code></p>
<p>Returns an array of field names from <code>expr</code> at the specified <code>path</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="json_object"></a><a href="#json_object" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>JSON_OBJECT</h2>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-json-functions.html">JSON</a></p>
<p><code>JSON_OBJECT(KEY expr1 VALUE expr2[, KEY expr3 VALUE expr4, ...])</code></p>
<p>Constructs a new <code>COMPLEX&lt;json&gt;</code> object. The <code>KEY</code> expressions must evaluate to string types. The <code>VALUE</code> expressions can be composed of any input type, including other <code>COMPLEX&lt;json&gt;</code> values. <code>JSON_OBJECT</code> can accept colon-separated key-value pairs. The following syntax is equivalent: <code>JSON_OBJECT(expr1:expr2[, expr3:expr4, ...])</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="json_paths"></a><a href="#json_paths" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>JSON_PATHS</h2>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-json-functions.html">JSON</a></p>
<p><code>JSON_PATHS(expr)</code></p>
<p>Returns an array of all paths which refer to literal values in <code>expr</code> in JSONPath format.</p>
<h2><a class="anchor" aria-hidden="true" id="json_query"></a><a href="#json_query" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>JSON_QUERY</h2>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-json-functions.html">JSON</a></p>
<p><code>JSON_QUERY(expr, path)</code></p>
<p>Extracts a <code>COMPLEX&lt;json&gt;</code> value from <code>expr</code>, at the specified <code>path</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="json_value"></a><a href="#json_value" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>JSON_VALUE</h2>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-json-functions.html">JSON</a></p>
<p><code>JSON_VALUE(expr, path [RETURNING sqlType])</code></p>
<p>Extracts a literal value from <code>expr</code> at the specified <code>path</code>. If you specify <code>RETURNING</code> and an SQL type name (such as <code>VARCHAR</code>, <code>BIGINT</code>, <code>DOUBLE</code>, etc) the function plans the query using the suggested type. Otherwise, it attempts to infer the type based on the context. If it can't infer the type, it defaults to <code>VARCHAR</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="latest"></a><a href="#latest" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LATEST</h2>
<p><code>LATEST(expr)</code></p>
<p><code>LATEST(expr, maxBytesPerString)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Returns the value of a numeric or string expression corresponding to the latest <code>__time</code> value.</p>
<h2><a class="anchor" aria-hidden="true" id="latest_by"></a><a href="#latest_by" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LATEST_BY</h2>
<p><code>LATEST_BY(expr, timestampExpr)</code></p>
<p><code>LATEST_BY(expr, timestampExpr, maxBytesPerString)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Returns the value of a numeric or string expression corresponding to the latest time value from <code>timestampExpr</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="least"></a><a href="#least" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LEAST</h2>
<p><code>LEAST([expr1, ...])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#reduction-functions">Scalar, reduction</a></p>
<p>Returns the minimum value from the provided arguments.</p>
<h2><a class="anchor" aria-hidden="true" id="left"></a><a href="#left" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LEFT</h2>
<p><code>LEFT(expr, [length])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns the leftmost number of characters from an expression.</p>
<h2><a class="anchor" aria-hidden="true" id="length"></a><a href="#length" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LENGTH</h2>
<p><code>LENGTH(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns the length of the expression in UTF-16 encoding.</p>
<h2><a class="anchor" aria-hidden="true" id="ln"></a><a href="#ln" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LN</h2>
<p><code>LN(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the natural logarithm of the numeric expression.</p>
<h2><a class="anchor" aria-hidden="true" id="log10"></a><a href="#log10" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LOG10</h2>
<p><code>LOG10(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the base-10 of the numeric expression.</p>
<h2><a class="anchor" aria-hidden="true" id="lookup"></a><a href="#lookup" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LOOKUP</h2>
<p><code>LOOKUP(&lt;CHARACTER&gt;, &lt;CHARACTER&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Looks up the expression in a registered query-time lookup table.</p>
<h2><a class="anchor" aria-hidden="true" id="lower"></a><a href="#lower" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LOWER</h2>
<p><code>LOWER(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns the expression in lowercase.</p>
<h2><a class="anchor" aria-hidden="true" id="lpad"></a><a href="#lpad" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LPAD</h2>
<p><code>LPAD(&lt;CHARACTER&gt;, &lt;INTEGER&gt;, [&lt;CHARACTER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns the leftmost number of characters from an expression, optionally padded with the given characters.</p>
<h2><a class="anchor" aria-hidden="true" id="ltrim"></a><a href="#ltrim" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>LTRIM</h2>
<p><code>LTRIM(&lt;CHARACTER&gt;, [&lt;CHARACTER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Trims characters from the leading end of an expression.</p>
<h2><a class="anchor" aria-hidden="true" id="max"></a><a href="#max" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MAX</h2>
<p><code>MAX(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Returns the maximum value of a set of values.</p>
<h2><a class="anchor" aria-hidden="true" id="millis_to_timestamp"></a><a href="#millis_to_timestamp" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MILLIS_TO_TIMESTAMP</h2>
<p><code>MILLIS_TO_TIMESTAMP(millis_expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Converts a number of milliseconds since epoch into a timestamp.</p>
<h2><a class="anchor" aria-hidden="true" id="min"></a><a href="#min" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MIN</h2>
<p><code>MIN(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Returns the minimum value of a set of values.</p>
<h2><a class="anchor" aria-hidden="true" id="mod"></a><a href="#mod" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MOD</h2>
<p><code>MOD(x, y)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates x modulo y, or the remainder of x divided by y.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_append"></a><a href="#mv_append" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_APPEND</h2>
<p><code>MV_APPEND(arr1, expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Adds the expression to the end of the array.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_concat"></a><a href="#mv_concat" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_CONCAT</h2>
<p><code>MV_CONCAT(arr1, arr2)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Concatenates two arrays.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_contains"></a><a href="#mv_contains" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_CONTAINS</h2>
<p><code>MV_CONTAINS(arr, expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Returns true if the expression is in the array, false otherwise.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_filter_none"></a><a href="#mv_filter_none" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_FILTER_NONE</h2>
<p><code>MV_FILTER_NONE(expr, arr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Filters a multi-value expression to include no values contained in the array.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_filter_only"></a><a href="#mv_filter_only" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_FILTER_ONLY</h2>
<p><code>MV_FILTER_ONLY(expr, arr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Filters a multi-value expression to include only values contained in the array.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_length"></a><a href="#mv_length" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_LENGTH</h2>
<p><code>MV_LENGTH(arr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Returns the length of an array expression.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_offset"></a><a href="#mv_offset" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_OFFSET</h2>
<p><code>MV_OFFSET(arr, long)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Returns the array element at the given zero-based index.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_offset_of"></a><a href="#mv_offset_of" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_OFFSET_OF</h2>
<p><code>MV_OFFSET_OF(arr, expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Returns the zero-based index of the first occurrence of a given expression in the array.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_ordinal"></a><a href="#mv_ordinal" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_ORDINAL</h2>
<p><code>MV_ORDINAL(arr, long)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Returns the array element at the given one-based index.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_ordinal_of"></a><a href="#mv_ordinal_of" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_ORDINAL_OF</h2>
<p><code>MV_ORDINAL_OF(arr, expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Returns the one-based index of the first occurrence of a given expression.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_overlap"></a><a href="#mv_overlap" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_OVERLAP</h2>
<p><code>MV_OVERLAP(arr1, arr2)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Returns true if the two arrays have any elements in common, false otherwise.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_prepend"></a><a href="#mv_prepend" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_PREPEND</h2>
<p><code>MV_PREPEND(expr, arr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Adds the expression to the beginning of the array.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_slice"></a><a href="#mv_slice" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_SLICE</h2>
<p><code>MV_SLICE(arr, start, end)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Returns a slice of the array from the zero-based start and end indexes.</p>
<h2><a class="anchor" aria-hidden="true" id="mv_to_string"></a><a href="#mv_to_string" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>MV_TO_STRING</h2>
<p><code>MV_TO_STRING(arr, str)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Joins all elements of the array together by the given delimiter.</p>
<h2><a class="anchor" aria-hidden="true" id="nullif"></a><a href="#nullif" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>NULLIF</h2>
<p><code>NULLIF(value1, value2)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#other-scalar-functions">Scalar, other</a></p>
<p>Returns NULL if two values are equal, else returns the first value.</p>
<h2><a class="anchor" aria-hidden="true" id="nvl"></a><a href="#nvl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>NVL</h2>
<p><code>NVL(e1, e2)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#other-scalar-functions">Scalar, other</a></p>
<p>Returns <code>e2</code> if <code>e1</code> is null, else returns <code>e1</code>.</p>
<h2><a class="anchor" aria-hidden="true" id="parse_json"></a><a href="#parse_json" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>PARSE_JSON</h2>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-json-functions.html">JSON</a></p>
<p><code>PARSE_JSON(expr)</code></p>
<p>Parses <code>expr</code> into a <code>COMPLEX&lt;json&gt;</code> object. This operator deserializes JSON values when processing them, translating stringified JSON into a nested structure. If the input is not a <code>VARCHAR</code> or it is invalid JSON, this function will result in an error.</p>
<h2><a class="anchor" aria-hidden="true" id="parse_long"></a><a href="#parse_long" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>PARSE_LONG</h2>
<p><code>PARSE_LONG(&lt;CHARACTER&gt;, [&lt;INTEGER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Converts a string into a BIGINT with the given base or into a DECIMAL data type if the base is not specified.</p>
<h2><a class="anchor" aria-hidden="true" id="position"></a><a href="#position" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>POSITION</h2>
<p><code>POSITION(&lt;CHARACTER&gt; IN &lt;CHARACTER&gt; [FROM &lt;INTEGER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns the one-based index position of a substring within an expression, optionally starting from a given one-based index.</p>
<h2><a class="anchor" aria-hidden="true" id="power"></a><a href="#power" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>POWER</h2>
<p><code>POWER(expr, power)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates a numerical expression raised to the specified power.</p>
<h2><a class="anchor" aria-hidden="true" id="radians"></a><a href="#radians" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>RADIANS</h2>
<p><code>RADIANS(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Converts an angle from degrees to radians.</p>
<h2><a class="anchor" aria-hidden="true" id="regexp_extract"></a><a href="#regexp_extract" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>REGEXP_EXTRACT</h2>
<p><code>REGEXP_EXTRACT(&lt;CHARACTER&gt;, &lt;CHARACTER&gt;, [&lt;INTEGER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Applies a regular expression to the string expression and returns the _n_th match.</p>
<h2><a class="anchor" aria-hidden="true" id="regexp_like"></a><a href="#regexp_like" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>REGEXP_LIKE</h2>
<p><code>REGEXP_LIKE(&lt;CHARACTER&gt;, &lt;CHARACTER&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns true or false signifying whether the regular expression finds a match in the string expression.</p>
<h2><a class="anchor" aria-hidden="true" id="repeat"></a><a href="#repeat" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>REPEAT</h2>
<p><code>REPEAT(&lt;CHARACTER&gt;, [&lt;INTEGER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Repeats the string expression an integer number of times.</p>
<h2><a class="anchor" aria-hidden="true" id="replace"></a><a href="#replace" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>REPLACE</h2>
<p><code>REPLACE(expr, pattern, replacement)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Replaces a pattern with another string in the given expression.</p>
<h2><a class="anchor" aria-hidden="true" id="reverse"></a><a href="#reverse" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>REVERSE</h2>
<p><code>REVERSE(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Reverses the given expression.</p>
<h2><a class="anchor" aria-hidden="true" id="right"></a><a href="#right" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>RIGHT</h2>
<p><code>RIGHT(expr, [length])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns the rightmost number of characters from an expression.</p>
<h2><a class="anchor" aria-hidden="true" id="round"></a><a href="#round" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>ROUND</h2>
<p><code>ROUND(expr[, digits])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the rounded value for a numerical expression.</p>
<h2><a class="anchor" aria-hidden="true" id="rpad"></a><a href="#rpad" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>RPAD</h2>
<p><code>RPAD(&lt;CHARACTER&gt;, &lt;INTEGER&gt;, [&lt;CHARACTER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns the rightmost number of characters from an expression, optionally padded with the given characters.</p>
<h2><a class="anchor" aria-hidden="true" id="rtrim"></a><a href="#rtrim" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>RTRIM</h2>
<p><code>RTRIM(&lt;CHARACTER&gt;, [&lt;CHARACTER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Trims characters from the trailing end of an expression.</p>
<h2><a class="anchor" aria-hidden="true" id="safe_divide"></a><a href="#safe_divide" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>SAFE_DIVIDE</h2>
<p><code>SAFE_DIVIDE(x, y)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Returns <code>x</code> divided by <code>y</code>, guarded on division by 0.</p>
<h2><a class="anchor" aria-hidden="true" id="sin"></a><a href="#sin" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>SIN</h2>
<p><code>SIN(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the trigonometric sine of an angle expressed in radians.</p>
<h2><a class="anchor" aria-hidden="true" id="sqrt"></a><a href="#sqrt" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>SQRT</h2>
<p><code>SQRT(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the square root of a numeric expression.</p>
<h2><a class="anchor" aria-hidden="true" id="stddev"></a><a href="#stddev" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>STDDEV</h2>
<p><code>STDDEV(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Alias for <a href="#stddev_samp"><code>STDDEV_SAMP</code></a>.</p>
<h2><a class="anchor" aria-hidden="true" id="stddev_pop"></a><a href="#stddev_pop" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>STDDEV_POP</h2>
<p><code>STDDEV_POP(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Calculates the population standard deviation of a set of values.</p>
<h2><a class="anchor" aria-hidden="true" id="stddev_samp"></a><a href="#stddev_samp" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>STDDEV_SAMP</h2>
<p><code>STDDEV_SAMP(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Calculates the sample standard deviation of a set of values.</p>
<h2><a class="anchor" aria-hidden="true" id="string_agg"></a><a href="#string_agg" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>STRING_AGG</h2>
<p><code>STRING_AGG(expr, separator, [size])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Collects all values of an expression into a single string.</p>
<h2><a class="anchor" aria-hidden="true" id="string_format"></a><a href="#string_format" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>STRING_FORMAT</h2>
<p><code>STRING_FORMAT(pattern[, args...])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns a string formatted in accordance to Java's String.format method.</p>
<h2><a class="anchor" aria-hidden="true" id="string_to_mv"></a><a href="#string_to_mv" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>STRING_TO_MV</h2>
<p><code>STRING_TO_MV(str1, str2)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-multivalue-string-functions.html">Multi-value string</a></p>
<p>Converts a string into an array, split by the given delimiter.</p>
<h2><a class="anchor" aria-hidden="true" id="strlen"></a><a href="#strlen" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>STRLEN</h2>
<p><code>STRLEN(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Alias for <a href="#length"><code>LENGTH</code></a>.</p>
<h2><a class="anchor" aria-hidden="true" id="strpos"></a><a href="#strpos" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>STRPOS</h2>
<p><code>STRPOS(&lt;CHARACTER&gt;, &lt;CHARACTER&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns the one-based index position of a substring within an expression.</p>
<h2><a class="anchor" aria-hidden="true" id="substr"></a><a href="#substr" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>SUBSTR</h2>
<p><code>SUBSTR(&lt;CHARACTER&gt;, &lt;INTEGER&gt;, [&lt;INTEGER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Alias for <a href="#substring"><code>SUBSTRING</code></a>.</p>
<h2><a class="anchor" aria-hidden="true" id="substring"></a><a href="#substring" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>SUBSTRING</h2>
<p><code>SUBSTRING(&lt;CHARACTER&gt;, &lt;INTEGER&gt;, [&lt;INTEGER&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns a substring of the expression starting at a given one-based index.</p>
<h2><a class="anchor" aria-hidden="true" id="sum"></a><a href="#sum" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>SUM</h2>
<p><code>SUM(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Calculates the sum of a set of values.</p>
<h2><a class="anchor" aria-hidden="true" id="tan"></a><a href="#tan" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TAN</h2>
<p><code>TAN(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Calculates the trigonometric tangent of an angle expressed in radians.</p>
<h2><a class="anchor" aria-hidden="true" id="tdigest_generate_sketch"></a><a href="#tdigest_generate_sketch" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TDIGEST_GENERATE_SKETCH</h2>
<p><code>TDIGEST_GENERATE_SKETCH(expr, [compression])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Generates a T-digest sketch from values of the specified expression.</p>
<h2><a class="anchor" aria-hidden="true" id="tdigest_quantile"></a><a href="#tdigest_quantile" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TDIGEST_QUANTILE</h2>
<p><code>TDIGEST_QUANTILE(expr, quantileFraction, [compression])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Returns the quantile for the specified fraction from a T-Digest sketch constructed from values of the expression.</p>
<h2><a class="anchor" aria-hidden="true" id="textcat"></a><a href="#textcat" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TEXTCAT</h2>
<p><code>TEXTCAT(&lt;CHARACTER&gt;, &lt;CHARACTER&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Concatenates two string expressions.</p>
<h2><a class="anchor" aria-hidden="true" id="theta_sketch_estimate"></a><a href="#theta_sketch_estimate" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>THETA_SKETCH_ESTIMATE</h2>
<p><code>THETA_SKETCH_ESTIMATE(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns the distinct count estimate from a Theta sketch.</p>
<h2><a class="anchor" aria-hidden="true" id="theta_sketch_estimate_with_error_bounds"></a><a href="#theta_sketch_estimate_with_error_bounds" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>THETA_SKETCH_ESTIMATE_WITH_ERROR_BOUNDS</h2>
<p><code>THETA_SKETCH_ESTIMATE_WITH_ERROR_BOUNDS(expr, errorBoundsStdDev)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns the distinct count estimate and error bounds from a Theta sketch.</p>
<h2><a class="anchor" aria-hidden="true" id="theta_sketch_intersect"></a><a href="#theta_sketch_intersect" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>THETA_SKETCH_INTERSECT</h2>
<p><code>THETA_SKETCH_INTERSECT([size], expr0, expr1, ...)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns an intersection of Theta sketches.</p>
<h2><a class="anchor" aria-hidden="true" id="theta_sketch_not"></a><a href="#theta_sketch_not" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>THETA_SKETCH_NOT</h2>
<p><code>THETA_SKETCH_NOT([size], expr0, expr1, ...)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns a set difference of Theta sketches.</p>
<h2><a class="anchor" aria-hidden="true" id="theta_sketch_union"></a><a href="#theta_sketch_union" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>THETA_SKETCH_UNION</h2>
<p><code>THETA_SKETCH_UNION([size], expr0, expr1, ...)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#sketch-functions">Scalar, sketch</a></p>
<p>Returns a union of Theta sketches.</p>
<h2><a class="anchor" aria-hidden="true" id="time_ceil"></a><a href="#time_ceil" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TIME_CEIL</h2>
<p><code>TIME_CEIL(&lt;TIMESTAMP&gt;, &lt;period&gt;, [&lt;origin&gt;, [&lt;timezone&gt;]])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Rounds up a timestamp by a given time period, optionally from some reference time or timezone.</p>
<h2><a class="anchor" aria-hidden="true" id="time_extract"></a><a href="#time_extract" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TIME_EXTRACT</h2>
<p><code>TIME_EXTRACT(&lt;TIMESTAMP&gt;, [&lt;unit&gt;, [&lt;timezone&gt;]])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Extracts the value of some unit of the timestamp and returns the number.</p>
<h2><a class="anchor" aria-hidden="true" id="time_floor"></a><a href="#time_floor" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TIME_FLOOR</h2>
<p><code>TIME_FLOOR(&lt;TIMESTAMP&gt;, &lt;period&gt;, [&lt;origin&gt;, [&lt;timezone&gt;]])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Rounds down a timestamp by a given time period, optionally from some reference time or timezone.</p>
<h2><a class="anchor" aria-hidden="true" id="time_format"></a><a href="#time_format" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TIME_FORMAT</h2>
<p><code>TIME_FORMAT(&lt;TIMESTAMP&gt;, [&lt;pattern&gt;, [&lt;timezone&gt;]])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Formats a timestamp as a string.</p>
<h2><a class="anchor" aria-hidden="true" id="time_in_interval"></a><a href="#time_in_interval" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TIME_IN_INTERVAL</h2>
<p><code>TIME_IN_INTERVAL(&lt;TIMESTAMP&gt;, &lt;CHARACTER&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Returns whether a timestamp is contained within a particular interval, formatted as a string.</p>
<h2><a class="anchor" aria-hidden="true" id="time_parse"></a><a href="#time_parse" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TIME_PARSE</h2>
<p><code>TIME_PARSE(&lt;string_expr&gt;, [&lt;pattern&gt;, [&lt;timezone&gt;]])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Parses a string into a timestamp.</p>
<h2><a class="anchor" aria-hidden="true" id="time_shift"></a><a href="#time_shift" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TIME_SHIFT</h2>
<p><code>TIME_SHIFT(&lt;TIMESTAMP&gt;, &lt;period&gt;, &lt;step&gt;, [&lt;timezone&gt;])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Shifts a timestamp forwards or backwards by a given number of time units.</p>
<h2><a class="anchor" aria-hidden="true" id="timestamp_to_millis"></a><a href="#timestamp_to_millis" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TIMESTAMP_TO_MILLIS</h2>
<p><code>TIMESTAMP_TO_MILLIS(&lt;TIMESTAMP&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Returns the number of milliseconds since epoch for the given timestamp.</p>
<h2><a class="anchor" aria-hidden="true" id="timestampadd"></a><a href="#timestampadd" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TIMESTAMPADD</h2>
<p><code>TIMESTAMPADD(&lt;unit&gt;, &lt;count&gt;, &lt;TIMESTAMP&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Adds a certain amount of time to a given timestamp.</p>
<h2><a class="anchor" aria-hidden="true" id="timestampdiff"></a><a href="#timestampdiff" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TIMESTAMPDIFF</h2>
<p><code>TIMESTAMPDIFF(&lt;unit&gt;, &lt;TIMESTAMP&gt;, &lt;TIMESTAMP&gt;)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#date-and-time-functions">Scalar, date and time</a></p>
<p>Takes the difference between two timestamps, returning the results in the given units.</p>
<h2><a class="anchor" aria-hidden="true" id="to_json_string"></a><a href="#to_json_string" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TO_JSON_STRING</h2>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-json-functions.html">JSON</a></p>
<p><code>TO_JSON_STRING(expr)</code></p>
<p>Serializes <code>expr</code> into a JSON string.</p>
<h2><a class="anchor" aria-hidden="true" id="trim"></a><a href="#trim" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TRIM</h2>
<p><code>TRIM([BOTH|LEADING|TRAILING] [&lt;chars&gt; FROM] expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Trims the leading or trailing characters of an expression.</p>
<h2><a class="anchor" aria-hidden="true" id="trunc"></a><a href="#trunc" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TRUNC</h2>
<p><code>TRUNC(expr[, digits])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Alias for <a href="#truncate"><code>TRUNCATE</code></a>.</p>
<h2><a class="anchor" aria-hidden="true" id="truncate"></a><a href="#truncate" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TRUNCATE</h2>
<p><code>TRUNCATE(expr[, digits])</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#numeric-functions">Scalar, numeric</a></p>
<p>Truncates a numerical expression to a specific number of decimal digits.</p>
<h2><a class="anchor" aria-hidden="true" id="try_parse_json"></a><a href="#try_parse_json" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>TRY_PARSE_JSON</h2>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-json-functions.html">JSON</a></p>
<p><code>TRY_PARSE_JSON(expr)</code></p>
<p>Parses <code>expr</code> into a <code>COMPLEX&lt;json&gt;</code> object. This operator deserializes JSON values when processing them, translating stringified JSON into a nested structure. If the input is not a <code>VARCHAR</code> or it is invalid JSON, this function will result in a <code>NULL</code> value.</p>
<h2><a class="anchor" aria-hidden="true" id="upper"></a><a href="#upper" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>UPPER</h2>
<p><code>UPPER(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-scalar.html#string-functions">Scalar, string</a></p>
<p>Returns the expression in uppercase.</p>
<h2><a class="anchor" aria-hidden="true" id="var_pop"></a><a href="#var_pop" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>VAR_POP</h2>
<p><code>VAR_POP(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Calculates the population variance of a set of values.</p>
<h2><a class="anchor" aria-hidden="true" id="var_samp"></a><a href="#var_samp" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>VAR_SAMP</h2>
<p><code>VAR_SAMP(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Calculates the sample variance of a set of values.</p>
<h2><a class="anchor" aria-hidden="true" id="variance"></a><a href="#variance" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>VARIANCE</h2>
<p><code>VARIANCE(expr)</code></p>
<p><strong>Function type:</strong> <a href="/docs/24.0.1/querying/sql-aggregations.html">Aggregation</a></p>
<p>Alias for <a href="#var_samp"><code>VAR_SAMP</code></a>.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/24.0.1/querying/sql-json-functions.html"><span class="arrow-prev">โ† </span><span>JSON functions</span></a><a class="docs-next button" href="/docs/24.0.1/querying/sql-api.html"><span>Druid SQL API</span><span class="arrow-next"> โ†’</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#abs">ABS</a></li><li><a href="#acos">ACOS</a></li><li><a href="#any_value">ANY_VALUE</a></li><li><a href="#approx_count_distinct">APPROX_COUNT_DISTINCT</a></li><li><a href="#approx_count_distinct_ds_hll">APPROX_COUNT_DISTINCT_DS_HLL</a></li><li><a href="#approx_count_distinct_ds_theta">APPROX_COUNT_DISTINCT_DS_THETA</a></li><li><a href="#approx_quantile">APPROX_QUANTILE</a></li><li><a href="#approx_quantile_ds">APPROX_QUANTILE_DS</a></li><li><a href="#approx_quantile_fixed_buckets">APPROX_QUANTILE_FIXED_BUCKETS</a></li><li><a href="#array">ARRAY[]</a></li><li><a href="#array_agg">ARRAY_AGG</a></li><li><a href="#array_concat_agg">ARRAY_CONCAT_AGG</a></li><li><a href="#asin">ASIN</a></li><li><a href="#atan">ATAN</a></li><li><a href="#atan2">ATAN2</a></li><li><a href="#avg">AVG</a></li><li><a href="#bit_and">BIT_AND</a></li><li><a href="#bit_or">BIT_OR</a></li><li><a href="#bit_xor">BIT_XOR</a></li><li><a href="#bitwise_and">BITWISE_AND</a></li><li><a href="#bitwise_complement">BITWISE_COMPLEMENT</a></li><li><a href="#bitwise_convert_double_to_long_bits">BITWISE_CONVERT_DOUBLE_TO_LONG_BITS</a></li><li><a href="#bitwise_convert_long_bits_to_double">BITWISE_CONVERT_LONG_BITS_TO_DOUBLE</a></li><li><a href="#bitwise_or">BITWISE_OR</a></li><li><a href="#bitwise_shift_left">BITWISE_SHIFT_LEFT</a></li><li><a href="#bitwise_shift_right">BITWISE_SHIFT_RIGHT</a></li><li><a href="#bitwise_xor">BITWISE_XOR</a></li><li><a href="#bloom_filter">BLOOM_FILTER</a></li><li><a href="#bloom_filter_test">BLOOM_FILTER_TEST</a></li><li><a href="#btrim">BTRIM</a></li><li><a href="#case">CASE</a></li><li><a href="#cast">CAST</a></li><li><a href="#ceil-date-and-time">CEIL (date and time)</a></li><li><a href="#ceil-numeric">CEIL (numeric)</a></li><li><a href="#char_length">CHAR_LENGTH</a></li><li><a href="#character_length">CHARACTER_LENGTH</a></li><li><a href="#coalesce">COALESCE</a></li><li><a href="#concat">CONCAT</a></li><li><a href="#contains_string">CONTAINS_STRING</a></li><li><a href="#cos">COS</a></li><li><a href="#cot">COT</a></li><li><a href="#count">COUNT</a></li><li><a href="#current_date">CURRENT_DATE</a></li><li><a href="#current_timestamp">CURRENT_TIMESTAMP</a></li><li><a href="#date_trunc">DATE_TRUNC</a></li><li><a href="#degrees">DEGREES</a></li><li><a href="#div">DIV</a></li><li><a href="#ds_cdf">DS_CDF</a></li><li><a href="#ds_get_quantile">DS_GET_QUANTILE</a></li><li><a href="#ds_get_quantiles">DS_GET_QUANTILES</a></li><li><a href="#ds_histogram">DS_HISTOGRAM</a></li><li><a href="#ds_hll">DS_HLL</a></li><li><a href="#ds_quantile_summary">DS_QUANTILE_SUMMARY</a></li><li><a href="#ds_quantiles_sketch">DS_QUANTILES_SKETCH</a></li><li><a href="#ds_rank">DS_RANK</a></li><li><a href="#ds_theta">DS_THETA</a></li><li><a href="#earliest">EARLIEST</a></li><li><a href="#earliest_by">EARLIEST_BY</a></li><li><a href="#exp">EXP</a></li><li><a href="#extract">EXTRACT</a></li><li><a href="#floor-date-and-time">FLOOR (date and time)</a></li><li><a href="#floor-numeric">FLOOR (numeric)</a></li><li><a href="#greatest">GREATEST</a></li><li><a href="#grouping">GROUPING</a></li><li><a href="#hll_sketch_estimate">HLL_SKETCH_ESTIMATE</a></li><li><a href="#hll_sketch_estimate_with_error_bounds">HLL_SKETCH_ESTIMATE_WITH_ERROR_BOUNDS</a></li><li><a href="#hll_sketch_to_string">HLL_SKETCH_TO_STRING</a></li><li><a href="#hll_sketch_union">HLL_SKETCH_UNION</a></li><li><a href="#human_readable_binary_byte_format">HUMAN_READABLE_BINARY_BYTE_FORMAT</a></li><li><a href="#human_readable_decimal_byte_format">HUMAN_READABLE_DECIMAL_BYTE_FORMAT</a></li><li><a href="#human_readable_decimal_format">HUMAN_READABLE_DECIMAL_FORMAT</a></li><li><a href="#icontains_string">ICONTAINS_STRING</a></li><li><a href="#ipv4_match">IPV4_MATCH</a></li><li><a href="#ipv4_parse">IPV4_PARSE</a></li><li><a href="#ipv4_stringify">IPV4_STRINGIFY</a></li><li><a href="#json_keys">JSON_KEYS</a></li><li><a href="#json_object">JSON_OBJECT</a></li><li><a href="#json_paths">JSON_PATHS</a></li><li><a href="#json_query">JSON_QUERY</a></li><li><a href="#json_value">JSON_VALUE</a></li><li><a href="#latest">LATEST</a></li><li><a href="#latest_by">LATEST_BY</a></li><li><a href="#least">LEAST</a></li><li><a href="#left">LEFT</a></li><li><a href="#length">LENGTH</a></li><li><a href="#ln">LN</a></li><li><a href="#log10">LOG10</a></li><li><a href="#lookup">LOOKUP</a></li><li><a href="#lower">LOWER</a></li><li><a href="#lpad">LPAD</a></li><li><a href="#ltrim">LTRIM</a></li><li><a href="#max">MAX</a></li><li><a href="#millis_to_timestamp">MILLIS_TO_TIMESTAMP</a></li><li><a href="#min">MIN</a></li><li><a href="#mod">MOD</a></li><li><a href="#mv_append">MV_APPEND</a></li><li><a href="#mv_concat">MV_CONCAT</a></li><li><a href="#mv_contains">MV_CONTAINS</a></li><li><a href="#mv_filter_none">MV_FILTER_NONE</a></li><li><a href="#mv_filter_only">MV_FILTER_ONLY</a></li><li><a href="#mv_length">MV_LENGTH</a></li><li><a href="#mv_offset">MV_OFFSET</a></li><li><a href="#mv_offset_of">MV_OFFSET_OF</a></li><li><a href="#mv_ordinal">MV_ORDINAL</a></li><li><a href="#mv_ordinal_of">MV_ORDINAL_OF</a></li><li><a href="#mv_overlap">MV_OVERLAP</a></li><li><a href="#mv_prepend">MV_PREPEND</a></li><li><a href="#mv_slice">MV_SLICE</a></li><li><a href="#mv_to_string">MV_TO_STRING</a></li><li><a href="#nullif">NULLIF</a></li><li><a href="#nvl">NVL</a></li><li><a href="#parse_json">PARSE_JSON</a></li><li><a href="#parse_long">PARSE_LONG</a></li><li><a href="#position">POSITION</a></li><li><a href="#power">POWER</a></li><li><a href="#radians">RADIANS</a></li><li><a href="#regexp_extract">REGEXP_EXTRACT</a></li><li><a href="#regexp_like">REGEXP_LIKE</a></li><li><a href="#repeat">REPEAT</a></li><li><a href="#replace">REPLACE</a></li><li><a href="#reverse">REVERSE</a></li><li><a href="#right">RIGHT</a></li><li><a href="#round">ROUND</a></li><li><a href="#rpad">RPAD</a></li><li><a href="#rtrim">RTRIM</a></li><li><a href="#safe_divide">SAFE_DIVIDE</a></li><li><a href="#sin">SIN</a></li><li><a href="#sqrt">SQRT</a></li><li><a href="#stddev">STDDEV</a></li><li><a href="#stddev_pop">STDDEV_POP</a></li><li><a href="#stddev_samp">STDDEV_SAMP</a></li><li><a href="#string_agg">STRING_AGG</a></li><li><a href="#string_format">STRING_FORMAT</a></li><li><a href="#string_to_mv">STRING_TO_MV</a></li><li><a href="#strlen">STRLEN</a></li><li><a href="#strpos">STRPOS</a></li><li><a href="#substr">SUBSTR</a></li><li><a href="#substring">SUBSTRING</a></li><li><a href="#sum">SUM</a></li><li><a href="#tan">TAN</a></li><li><a href="#tdigest_generate_sketch">TDIGEST_GENERATE_SKETCH</a></li><li><a href="#tdigest_quantile">TDIGEST_QUANTILE</a></li><li><a href="#textcat">TEXTCAT</a></li><li><a href="#theta_sketch_estimate">THETA_SKETCH_ESTIMATE</a></li><li><a href="#theta_sketch_estimate_with_error_bounds">THETA_SKETCH_ESTIMATE_WITH_ERROR_BOUNDS</a></li><li><a href="#theta_sketch_intersect">THETA_SKETCH_INTERSECT</a></li><li><a href="#theta_sketch_not">THETA_SKETCH_NOT</a></li><li><a href="#theta_sketch_union">THETA_SKETCH_UNION</a></li><li><a href="#time_ceil">TIME_CEIL</a></li><li><a href="#time_extract">TIME_EXTRACT</a></li><li><a href="#time_floor">TIME_FLOOR</a></li><li><a href="#time_format">TIME_FORMAT</a></li><li><a href="#time_in_interval">TIME_IN_INTERVAL</a></li><li><a href="#time_parse">TIME_PARSE</a></li><li><a href="#time_shift">TIME_SHIFT</a></li><li><a href="#timestamp_to_millis">TIMESTAMP_TO_MILLIS</a></li><li><a href="#timestampadd">TIMESTAMPADD</a></li><li><a href="#timestampdiff">TIMESTAMPDIFF</a></li><li><a href="#to_json_string">TO_JSON_STRING</a></li><li><a href="#trim">TRIM</a></li><li><a href="#trunc">TRUNC</a></li><li><a href="#truncate">TRUNCATE</a></li><li><a href="#try_parse_json">TRY_PARSE_JSON</a></li><li><a href="#upper">UPPER</a></li><li><a href="#var_pop">VAR_POP</a></li><li><a href="#var_samp">VAR_SAMP</a></li><li><a href="#variance">VARIANCE</a></li></ul></nav></div><footer class="nav-footer druid-footer" id="footer"><div class="container"><div class="text-center"><p><a href="/technology">Technology</a>โ€‚ยทโ€‚<a href="/use-cases">Use Cases</a>โ€‚ยทโ€‚<a href="/druid-powered">Powered by Druid</a>โ€‚ยทโ€‚<a href="/docs/24.0.1/">Docs</a>โ€‚ยทโ€‚<a href="/community/">Community</a>โ€‚ยทโ€‚<a href="/downloads.html">Download</a>โ€‚ยทโ€‚<a href="/faq">FAQ</a></p></div><div class="text-center"><a title="Join the user group" href="https://groups.google.com/forum/#!forum/druid-user" target="_blank"><span class="fa fa-comments"></span></a>โ€‚ยทโ€‚<a title="Follow Druid" href="https://twitter.com/druidio" target="_blank"><span class="fab fa-twitter"></span></a>โ€‚ยทโ€‚<a title="Download via Apache" href="https://www.apache.org/dyn/closer.cgi?path=/incubator/druid/{{ site.druid_versions[0].versions[0].version }}/apache-druid-{{ site.druid_versions[0].versions[0].version }}-bin.tar.gz" target="_blank"><span class="fas fa-feather"></span></a>โ€‚ยทโ€‚<a title="GitHub" href="https://github.com/apache/druid" target="_blank"><span class="fab fa-github"></span></a></div><div class="text-center license">Copyright ยฉ 2022 <a href="https://www.apache.org/" target="_blank">Apache Software Foundation</a>.<br/>Except where otherwise noted, licensed under <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>.<br/>Apache Druid, Druid, and the Druid logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.</div></div></footer></div><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script><script>
document.addEventListener('keyup', function(e) {
if (e.target !== document.body) {
return;
}
// keyCode for '/' (slash)
if (e.keyCode === 191) {
const search = document.getElementById('search_input_react');
search && search.focus();
}
});
</script><script>
var search = docsearch({
appId: 'CPK9PMSCEY',
apiKey: 'd4ef4ffe3a2f0c7d1e34b062fd98736b',
indexName: 'apache_druid',
inputSelector: '#search_input_react',
algoliaOptions: {"facetFilters":["language:en","version:24.0.1"]}
});
</script></body></html>