Functions (alphabetical)

This topic contains all functions supported by GoogleSQL for BigQuery.

Function list

NameSummary
ABSComputes the absolute value of X.
ACOSComputes the inverse cosine of X.
ACOSHComputes the inverse hyperbolic cosine of X.
AEAD.DECRYPT_BYTESUses the matching key from a keyset to decrypt a BYTES ciphertext.
AEAD.DECRYPT_STRINGUses the matching key from a keyset to decrypt a BYTES ciphertext into a STRING plaintext.
AEAD.ENCRYPTEncrypts STRING plaintext, using the primary cryptographic key in a keyset.
ANY_VALUEGets an expression for some row.
APPENDSReturns all rows appended to a table for a given time range.
APPROX_COUNT_DISTINCTGets the approximate result for COUNT(DISTINCT expression).
APPROX_QUANTILESGets the approximate quantile boundaries.
APPROX_TOP_COUNTGets the approximate top elements and their approximate count.
APPROX_TOP_SUMGets the approximate top elements and sum, based on the approximate sum of an assigned weight.
ARRAYProduces an array with one element for each row in a subquery.
ARRAY_AGGGets an array of values.
ARRAY_CONCATConcatenates one or more arrays with the same element type into a single array.
ARRAY_CONCAT_AGGConcatenates arrays and returns a single array as a result.
ARRAY_LENGTHGets the number of elements in an array.
ARRAY_REVERSEReverses the order of elements in an array.
ARRAY_TO_STRINGProduces a concatenation of the elements in an array as a STRING value.
ASCIIGets the ASCII code for the first character or byte in a STRING or BYTES value.
ASINComputes the inverse sine of X.
ASINHComputes the inverse hyperbolic sine of X.
ATANComputes the inverse tangent of X.
ATAN2Computes the inverse tangent of X/Y, using the signs of X and Y to determine the quadrant.
ATANHComputes the inverse hyperbolic tangent of X.
AVGGets the average of non-NULL values.
AVG (Differential Privacy)DIFFERENTIAL_PRIVACY-supported AVG.

Gets the differentially-private average of non-NULL, non-NaN values in a query with a DIFFERENTIAL_PRIVACY clause.
BAG_OF_WORDSGets the frequency of each term (token) in a tokenized document.
BIT_ANDPerforms a bitwise AND operation on an expression.
BIT_COUNTGets the number of bits that are set in an input expression.
BIT_ORPerforms a bitwise OR operation on an expression.
BIT_XORPerforms a bitwise XOR operation on an expression.
BOOLConverts a JSON boolean to a SQL BOOL value.
BYTE_LENGTHGets the number of BYTES in a STRING or BYTES value.
CASTConvert the results of an expression to the given type.
CBRTComputes the cube root of X.
CEILGets the smallest integral value that isn't less than X.
CEILINGSynonym of CEIL.
CHANGESReturns all rows that have changed in a table for a given time range.
CHAR_LENGTHGets the number of characters in a STRING value.
CHARACTER_LENGTHSynonym for CHAR_LENGTH.
CHRConverts a Unicode code point to a character.
CODE_POINTS_TO_BYTESConverts an array of extended ASCII code points to a BYTES value.
CODE_POINTS_TO_STRINGConverts an array of extended ASCII code points to a STRING value.
COLLATECombines a STRING value and a collation specification into a collation specification-supported STRING value.
CONCATConcatenates one or more STRING or BYTES values into a single result.
CONTAINS_SUBSTRPerforms a normalized, case-insensitive search to see if a value exists as a substring in an expression.
CORRComputes the Pearson coefficient of correlation of a set of number pairs.
COSComputes the cosine of X.
COSHComputes the hyperbolic cosine of X.
COSINE_DISTANCEComputes the cosine distance between two vectors.
COTComputes the cotangent of X.
COTHComputes the hyperbolic cotangent of X.
COUNTGets the number of rows in the input, or the number of rows with an expression evaluated to any value other than NULL.
COUNT (Differential Privacy)DIFFERENTIAL_PRIVACY-supported COUNT.

Signature 1: Gets the differentially-private count of rows in a query with a DIFFERENTIAL_PRIVACY clause.

Signature 2: Gets the differentially-private count of rows with a non-NULL expression in a query with a DIFFERENTIAL_PRIVACY clause.
COUNTIFGets the number of TRUE values for an expression.
COVAR_POPComputes the population covariance of a set of number pairs.
COVAR_SAMPComputes the sample covariance of a set of number pairs.
CSCComputes the cosecant of X.
CSCHComputes the hyperbolic cosecant of X.
CUME_DISTGets the cumulative distribution (relative position (0,1]) of each row within a window.
CURRENT_DATEReturns the current date as a DATE value.
CURRENT_DATETIMEReturns the current date and time as a DATETIME value.
CURRENT_TIMEReturns the current time as a TIME value.
CURRENT_TIMESTAMPReturns the current date and time as a TIMESTAMP object.
DATEConstructs a DATE value.
DATE_ADDAdds a specified time interval to a DATE value.
DATE_BUCKETGets the lower bound of the date bucket that contains a date.
DATE_DIFFGets the number of unit boundaries between two DATE values at a particular time granularity.
DATE_FROM_UNIX_DATEInterprets an INT64 expression as the number of days since 1970-01-01.
DATE_SUBSubtracts a specified time interval from a DATE value.
DATE_TRUNCTruncates a DATE, DATETIME, or TIMESTAMP value at a particular granularity.
DATETIMEConstructs a DATETIME value.
DATETIME_ADDAdds a specified time interval to a DATETIME value.
DATETIME_BUCKETGets the lower bound of the datetime bucket that contains a datetime.
DATETIME_DIFFGets the number of unit boundaries between two DATETIME values at a particular time granularity.
DATETIME_SUBSubtracts a specified time interval from a DATETIME value.
DATETIME_TRUNCTruncates a DATETIME or TIMESTAMP value at a particular granularity.
DENSE_RANKGets the dense rank (1-based, no gaps) of each row within a window.
DETERMINISTIC_DECRYPT_BYTESUses the matching key from a keyset to decrypt a BYTES ciphertext, using deterministic AEAD.
DETERMINISTIC_DECRYPT_STRINGUses the matching key from a keyset to decrypt a BYTES ciphertext into a STRING plaintext, using deterministic AEAD.
DETERMINISTIC_ENCRYPTEncrypts STRING plaintext, using the primary cryptographic key in a keyset, using deterministic AEAD encryption.
DIVDivides integer X by integer Y.
DLP_DETERMINISTIC_ENCRYPTEncrypts data with a DLP compatible algorithm.
DLP_DETERMINISTIC_DECRYPTDecrypts DLP-encrypted data.
DLP_KEY_CHAINGets a data encryption key that's wrapped by Cloud Key Management Service.
FLOAT64Converts a JSON number to a SQL FLOAT64 value.
EDIT_DISTANCEComputes the Levenshtein distance between two STRING or BYTES values.
ENDS_WITHChecks if a STRING or BYTES value is the suffix of another value.
ERRORProduces an error with a custom error message.
EXPComputes e to the power of X.
EXTERNAL_OBJECT_TRANSFORMProduces an object table with the original columns plus one or more additional columns.
EXTERNAL_QUERYExecutes a query on an external database and returns the results as a temporary table.
EXTRACTExtracts part of a date from a DATE value.
EXTRACTExtracts part of a date and time from a DATETIME value.
EXTRACTExtracts part of an INTERVAL value.
EXTRACTExtracts part of a TIME value.
EXTRACTExtracts part of a TIMESTAMP value.
EUCLIDEAN_DISTANCEComputes the Euclidean distance between two vectors.
FARM_FINGERPRINTComputes the fingerprint of a STRING or BYTES value, using the FarmHash Fingerprint64 algorithm.
FIRST_VALUEGets a value for the first row in the current window frame.
FLOORGets the largest integral value that isn't greater than X.
FORMAT_DATEFormats a DATE value according to a specified format string.
FORMAT_DATETIMEFormats a DATETIME value according to a specified format string.
FORMAT_TIMEFormats a TIME value according to the specified format string.
FORMAT_TIMESTAMPFormats a TIMESTAMP value according to the specified format string.
FORMATFormats data and produces the results as a STRING value.
FROM_BASE32Converts a base32-encoded STRING value into a BYTES value.
FROM_BASE64Converts a base64-encoded STRING value into a BYTES value.
FROM_HEXConverts a hexadecimal-encoded STRING value into a BYTES value.
GAP_FILLFinds and fills gaps in a time series.
GENERATE_ARRAYGenerates an array of values in a range.
GENERATE_DATE_ARRAYGenerates an array of dates in a range.
GENERATE_RANGE_ARRAYSplits a range into an array of subranges.
GENERATE_TIMESTAMP_ARRAYGenerates an array of timestamps in a range.
GENERATE_UUIDProduces a random universally unique identifier (UUID) as a STRING value.
GREATESTGets the greatest value among X1,...,XN.
GROUPINGChecks if a groupable value in the GROUP BY clause is aggregated.
HLL_COUNT.EXTRACTExtracts a cardinality estimate of an HLL++ sketch.
HLL_COUNT.INITAggregates values of the same underlying type into a new HLL++ sketch.
HLL_COUNT.MERGEMerges HLL++ sketches of the same underlying type into a new sketch, and then gets the cardinality of the new sketch.
HLL_COUNT.MERGE_PARTIALMerges HLL++ sketches of the same underlying type into a new sketch.
IEEE_DIVIDEDivides X by Y, but doesn't generate errors for division by zero or overflow.
INITCAPFormats a STRING as proper case, which means that the first character in each word is uppercase and all other characters are lowercase.
INSTRFinds the position of a subvalue inside another value, optionally starting the search at a given offset or occurrence.
INT64Converts a JSON number to a SQL INT64 value.
IS_INFChecks if X is positive or negative infinity.
IS_NANChecks if X is a NaN value.
JSON_ARRAYCreates a JSON array.
JSON_ARRAY_APPENDAppends JSON data to the end of a JSON array.
JSON_ARRAY_INSERTInserts JSON data into a JSON array.
JSON_EXTRACT(Deprecated) Extracts a JSON value and converts it to a SQL JSON-formatted STRING or JSON value.
JSON_EXTRACT_ARRAY(Deprecated) Extracts a JSON array and converts it to a SQL ARRAY<JSON-formatted STRING> or ARRAY<JSON> value.
JSON_EXTRACT_SCALAR(Deprecated) Extracts a JSON scalar value and converts it to a SQL STRING value.
JSON_EXTRACT_STRING_ARRAY(Deprecated) Extracts a JSON array of scalar values and converts it to a SQL ARRAY<STRING> value.
JSON_KEYSExtracts unique JSON keys from a JSON expression.
JSON_OBJECTCreates a JSON object.
JSON_QUERYExtracts a JSON value and converts it to a SQL JSON-formatted STRING or JSON value.
JSON_QUERY_ARRAYExtracts a JSON array and converts it to a SQL ARRAY<JSON-formatted STRING> or ARRAY<JSON> value.
JSON_REMOVEProduces JSON with the specified JSON data removed.
JSON_SETInserts or replaces JSON data.
JSON_STRIP_NULLSRemoves JSON nulls from JSON objects and JSON arrays.
JSON_TYPEGets the JSON type of the outermost JSON value and converts the name of this type to a SQL STRING value.
JSON_VALUEExtracts a JSON scalar value and converts it to a SQL STRING value.
JSON_VALUE_ARRAYExtracts a JSON array of scalar values and converts it to a SQL ARRAY<STRING> value.
JUSTIFY_DAYSNormalizes the day part of an INTERVAL value.
JUSTIFY_HOURSNormalizes the time part of an INTERVAL value.
JUSTIFY_INTERVALNormalizes the day and time parts of an INTERVAL value.
KEYS.ADD_KEY_FROM_RAW_BYTESAdds a key to a keyset, and return the new keyset as a serialized BYTES value.
KEYS.KEYSET_CHAINProduces a Tink keyset that's encrypted with a Cloud KMS key.
KEYS.KEYSET_FROM_JSONConverts a STRING JSON keyset to a serialized BYTES value.
KEYS.KEYSET_LENGTHGets the number of keys in the provided keyset.
KEYS.KEYSET_TO_JSONGets a JSON STRING representation of a keyset.
KEYS.NEW_KEYSETGets a serialized keyset containing a new key based on the key type.
KEYS.NEW_WRAPPED_KEYSETCreates a new keyset and encrypts it with a Cloud KMS key.
KEYS.REWRAP_KEYSETRe-encrypts a wrapped keyset with a new Cloud KMS key.
KEYS.ROTATE_KEYSETAdds a new primary cryptographic key to a keyset, based on the key type.
KEYS.ROTATE_WRAPPED_KEYSETRewraps a keyset and rotates it.
KLL_QUANTILES.EXTRACT_INT64Gets a selected number of quantiles from an INT64-initialized KLL sketch.
KLL_QUANTILES.EXTRACT_FLOAT64Gets a selected number of quantiles from a FLOAT64-initialized KLL sketch.
KLL_QUANTILES.EXTRACT_POINT_INT64Gets a specific quantile from an INT64-initialized KLL sketch.
KLL_QUANTILES.EXTRACT_POINT_FLOAT64Gets a specific quantile from a FLOAT64-initialized KLL sketch.
KLL_QUANTILES.INIT_INT64Aggregates values into an INT64-initialized KLL sketch.
KLL_QUANTILES.INIT_FLOAT64Aggregates values into a FLOAT64-initialized KLL sketch.
KLL_QUANTILES.MERGE_INT64Merges INT64-initialized KLL sketches into a new sketch, and then gets the quantiles from the new sketch.
KLL_QUANTILES.MERGE_FLOAT64Merges FLOAT64-initialized KLL sketches into a new sketch, and then gets the quantiles from the new sketch.
KLL_QUANTILES.MERGE_PARTIALMerges KLL sketches of the same underlying type into a new sketch.
KLL_QUANTILES.MERGE_POINT_INT64Merges INT64-initialized KLL sketches into a new sketch, and then gets a specific quantile from the new sketch.
KLL_QUANTILES.MERGE_POINT_FLOAT64Merges FLOAT64-initialized KLL sketches into a new sketch, and then gets a specific quantile from the new sketch.
LAGGets a value for a preceding row.
LAST_DAYGets the last day in a specified time period that contains a DATE value.
LAST_DAYGets the last day in a specified time period that contains a DATETIME value.
LAST_VALUEGets a value for the last row in the current window frame.
LAX_BOOLAttempts to convert a JSON value to a SQL BOOL value.
LAX_FLOAT64Attempts to convert a JSON value to a SQL FLOAT64 value.
LAX_INT64Attempts to convert a JSON value to a SQL INT64 value.
LAX_STRINGAttempts to convert a JSON value to a SQL STRING value.
LEADGets a value for a subsequent row.
LEASTGets the least value among X1,...,XN.
LEFTGets the specified leftmost portion from a STRING or BYTES value.
LENGTHGets the length of a STRING or BYTES value.
LNComputes the natural logarithm of X.
LOGComputes the natural logarithm of X or the logarithm of X to base Y.
LOG10Computes the natural logarithm of X to base 10.
LOGICAL_ANDGets the logical AND of all non-NULL expressions.
LOGICAL_ORGets the logical OR of all non-NULL expressions.
LOWERFormats alphabetic characters in a STRING value as lowercase.

Formats ASCII characters in a BYTES value as lowercase.
LPADPrepends a STRING or BYTES value with a pattern.
LTRIMIdentical to the TRIM function, but only removes leading characters.
MAKE_INTERVALConstructs an INTERVAL value.
MAXGets the maximum non-NULL value.
MAX_BYSynonym for ANY_VALUE(x HAVING MAX y).
MD5Computes the hash of a STRING or BYTES value, using the MD5 algorithm.
MINGets the minimum non-NULL value.
MIN_BYSynonym for ANY_VALUE(x HAVING MIN y).
MODGets the remainder of the division of X by Y.
NET.HOSTGets the hostname from a URL.
NET.IP_FROM_STRINGConverts an IPv4 or IPv6 address from a STRING value to a BYTES value in network byte order.
NET.IP_NET_MASKGets a network mask.
NET.IP_TO_STRINGConverts an IPv4 or IPv6 address from a BYTES value in network byte order to a STRING value.
NET.IP_TRUNCConverts a BYTES IPv4 or IPv6 address in network byte order to a BYTES subnet address.
NET.IPV4_FROM_INT64Converts an IPv4 address from an INT64 value to a BYTES value in network byte order.
NET.IPV4_TO_INT64Converts an IPv4 address from a BYTES value in network byte order to an INT64 value.
NET.PUBLIC_SUFFIXGets the public suffix from a URL.
NET.REG_DOMAINGets the registered or registrable domain from a URL.
NET.SAFE_IP_FROM_STRINGSimilar to the NET.IP_FROM_STRING, but returns NULL instead of producing an error if the input is invalid.
NORMALIZECase-sensitively normalizes the characters in a STRING value.
NORMALIZE_AND_CASEFOLDCase-insensitively normalizes the characters in a STRING value.
NTH_VALUEGets a value for the Nth row of the current window frame.
NTILEGets the quantile bucket number (1-based) of each row within a window.
OBJ.FETCH_METADATAFetches Cloud Storage metadata for a partially populated ObjectRef value.
OBJ.GET_ACCESS_URLReturns access URLs for a Cloud Storage object.
OBJ.MAKE_REFCreates an ObjectRef value that contains reference information for a Cloud Storage object.
OCTET_LENGTHAlias for BYTE_LENGTH.
PARSE_BIGNUMERICConverts a STRING value to a BIGNUMERIC value.
PARSE_DATEConverts a STRING value to a DATE value.
PARSE_DATETIMEConverts a STRING value to a DATETIME value.
PARSE_JSONConverts a JSON-formatted STRING value to a JSON value.
PARSE_NUMERICConverts a STRING value to a NUMERIC value.
PARSE_TIMEConverts a STRING value to a TIME value.
PARSE_TIMESTAMPConverts a STRING value to a TIMESTAMP value.
PERCENT_RANKGets the percentile rank (from 0 to 1) of each row within a window.
PERCENTILE_CONTComputes the specified percentile for a value, using linear interpolation.
PERCENTILE_CONT (Differential Privacy)DIFFERENTIAL_PRIVACY-supported PERCENTILE_CONT.

Computes a differentially-private percentile across privacy unit columns in a query with a DIFFERENTIAL_PRIVACY clause.
PERCENTILE_DISCComputes the specified percentile for a discrete value.
POWProduces the value of X raised to the power of Y.
POWERSynonym of POW.
RANDGenerates a pseudo-random value of type FLOAT64 in the range of [0, 1).
RANGEConstructs a range of DATE, DATETIME, or TIMESTAMP values.
RANGE_BUCKETScans through a sorted array and returns the 0-based position of a point's upper bound.
RANGE_CONTAINSSignature 1: Checks if one range is in another range.

Signature 2: Checks if a value is in a range.
RANGE_ENDGets the upper bound of a range.
RANGE_INTERSECTGets a segment of two ranges that intersect.
RANGE_OVERLAPSChecks if two ranges overlap.
RANGE_SESSIONIZEProduces a table of sessionized ranges.
RANGE_STARTGets the lower bound of a range.
RANKGets the rank (1-based) of each row within a window.
REGEXP_CONTAINSChecks if a value is a partial match for a regular expression.
REGEXP_EXTRACTProduces a substring that matches a regular expression.
REGEXP_EXTRACT_ALLProduces an array of all substrings that match a regular expression.
REGEXP_INSTRFinds the position of a regular expression match in a value, optionally starting the search at a given offset or occurrence.
REGEXP_REPLACEProduces a STRING value where all substrings that match a regular expression are replaced with a specified value.
REGEXP_SUBSTRSynonym for REGEXP_EXTRACT.
REPEATProduces a STRING or BYTES value that consists of an original value, repeated.
REPLACEReplaces all occurrences of a pattern with another pattern in a STRING or BYTES value.
REVERSEReverses a STRING or BYTES value.
RIGHTGets the specified rightmost portion from a STRING or BYTES value.
ROUNDRounds X to the nearest integer or rounds X to N decimal places after the decimal point.
ROW_NUMBERGets the sequential row number (1-based) of each row within a window.
RPADAppends a STRING or BYTES value with a pattern.
RTRIMIdentical to the TRIM function, but only removes trailing characters.
S2_CELLIDFROMPOINTGets the S2 cell ID covering a point GEOGRAPHY value.
S2_COVERINGCELLIDSGets an array of S2 cell IDs that cover a GEOGRAPHY value.
SAFE_ADDEquivalent to the addition operator (X + Y), but returns NULL if overflow occurs.
SAFE_CASTSimilar to the CAST function, but returns NULL when a runtime error is produced.
SAFE_CONVERT_BYTES_TO_STRINGConverts a BYTES value to a STRING value and replace any invalid UTF-8 characters with the Unicode replacement character, U+FFFD.
SAFE_DIVIDEEquivalent to the division operator (X / Y), but returns NULL if an error occurs.
SAFE_MULTIPLYEquivalent to the multiplication operator (X * Y), but returns NULL if overflow occurs.
SAFE_NEGATEEquivalent to the unary minus operator (-X), but returns NULL if overflow occurs.
SAFE_SUBTRACTEquivalent to the subtraction operator (X - Y), but returns NULL if overflow occurs.
SEARCHChecks to see whether a table or other search data contains a set of search terms.
SECComputes the secant of X.
SECHComputes the hyperbolic secant of X.
SESSION_USERGet the email address or principal identifier of the user that's running the query.
SHA1Computes the hash of a STRING or BYTES value, using the SHA-1 algorithm.
SHA256Computes the hash of a STRING or BYTES value, using the SHA-256 algorithm.
SHA512Computes the hash of a STRING or BYTES value, using the SHA-512 algorithm.
SIGNProduces -1 , 0, or +1 for negative, zero, and positive arguments respectively.
SINComputes the sine of X.
SINHComputes the hyperbolic sine of X.
SOUNDEXGets the Soundex codes for words in a STRING value.
SPLITSplits a STRING or BYTES value, using a delimiter.
SQRTComputes the square root of X.
ST_ANGLETakes three point GEOGRAPHY values, which represent two intersecting lines, and returns the angle between these lines.
ST_AREAGets the area covered by the polygons in a GEOGRAPHY value.
ST_ASBINARYConverts a GEOGRAPHY value to a BYTES WKB geography value.
ST_ASGEOJSONConverts a GEOGRAPHY value to a STRING GeoJSON geography value.
ST_ASTEXTConverts a GEOGRAPHY value to a STRING WKT geography value.
ST_AZIMUTHGets the azimuth of a line segment formed by two point GEOGRAPHY values.
ST_BOUNDARYGets the union of component boundaries in a GEOGRAPHY value.
ST_BOUNDINGBOXGets the bounding box for a GEOGRAPHY value.
ST_BUFFERGets the buffer around a GEOGRAPHY value, using a specific number of segments.
ST_BUFFERWITHTOLERANCEGets the buffer around a GEOGRAPHY value, using tolerance.
ST_CENTROIDGets the centroid of a GEOGRAPHY value.
ST_CENTROID_AGGGets the centroid of a set of GEOGRAPHY values.
ST_CLOSESTPOINTGets the point on a GEOGRAPHY value which is closest to any point in a second GEOGRAPHY value.
ST_CLUSTERDBSCANPerforms DBSCAN clustering on a group of GEOGRAPHY values and produces a 0-based cluster number for this row.
ST_CONTAINSChecks if one GEOGRAPHY value contains another GEOGRAPHY value.
ST_CONVEXHULLReturns the convex hull for a GEOGRAPHY value.
ST_COVEREDBYChecks if all points of a GEOGRAPHY value are on the boundary or interior of another GEOGRAPHY value.
ST_COVERSChecks if all points of a GEOGRAPHY value are on the boundary or interior of another GEOGRAPHY value.
ST_DIFFERENCEGets the point set difference between two GEOGRAPHY values.
ST_DIMENSIONGets the dimension of the highest-dimensional element in a GEOGRAPHY value.
ST_DISJOINTChecks if two GEOGRAPHY values are disjoint (don't intersect).
ST_DISTANCEGets the shortest distance in meters between two GEOGRAPHY values.
ST_DUMPReturns an array of simple GEOGRAPHY components in a GEOGRAPHY value.
ST_DWITHINChecks if any points in two GEOGRAPHY values are within a given distance.
ST_ENDPOINTGets the last point of a linestring GEOGRAPHY value.
ST_EQUALSChecks if two GEOGRAPHY values represent the same GEOGRAPHY value.
ST_EXTENTGets the bounding box for a group of GEOGRAPHY values.
ST_EXTERIORRINGReturns a linestring GEOGRAPHY value that corresponds to the outermost ring of a polygon GEOGRAPHY value.
ST_GEOGFROMConverts a STRING or BYTES value into a GEOGRAPHY value.
ST_GEOGFROMGEOJSONConverts a STRING GeoJSON geometry value into a GEOGRAPHY value.
ST_GEOGFROMTEXTConverts a STRING WKT geometry value into a GEOGRAPHY value.
ST_GEOGFROMWKBConverts a BYTES or hexadecimal-text STRING WKT geometry value into a GEOGRAPHY value.
ST_GEOGPOINTCreates a point GEOGRAPHY value for a given longitude and latitude.
ST_GEOGPOINTFROMGEOHASHGets a point GEOGRAPHY value that's in the middle of a bounding box defined in a STRING GeoHash value.
ST_GEOHASHConverts a point GEOGRAPHY value to a STRING GeoHash value.
ST_GEOMETRYTYPEGets the Open Geospatial Consortium (OGC) geometry type for a GEOGRAPHY value.
ST_HAUSDORFFDISTANCEGets the discrete Hausdorff distance between two geometries.
ST_HAUSDORFFDWITHINChecks if the Hausdorff distance between two GEOGRAPHY values is within a given distance.
ST_INTERIORRINGSGets the interior rings of a polygon GEOGRAPHY value.
ST_INTERSECTIONGets the point set intersection of two GEOGRAPHY values.
ST_INTERSECTSChecks if at least one point appears in two GEOGRAPHY values.
ST_INTERSECTSBOXChecks if a GEOGRAPHY value intersects a rectangle.
ST_ISCLOSEDChecks if all components in a GEOGRAPHY value are closed.
ST_ISCOLLECTIONChecks if the total number of points, linestrings, and polygons is greater than one in a GEOGRAPHY value.
ST_ISEMPTYChecks if a GEOGRAPHY value is empty.
ST_ISRINGChecks if a GEOGRAPHY value is a closed, simple linestring.
ST_LENGTHGets the total length of lines in a GEOGRAPHY value.
ST_LINEINTERPOLATEPOINTGets a point at a specific fraction in a linestring GEOGRAPHY value.
ST_LINELOCATEPOINTGets a section of a linestring GEOGRAPHY value between the start point and a point GEOGRAPHY value.
ST_LINESUBSTRINGGets a segment of a single linestring at a specific starting and ending fraction.
ST_MAKELINECreates a linestring GEOGRAPHY value by concatenating the point and linestring vertices of GEOGRAPHY values.
ST_MAKEPOLYGONConstructs a polygon GEOGRAPHY value by combining a polygon shell with polygon holes.
ST_MAKEPOLYGONORIENTEDConstructs a polygon GEOGRAPHY value, using an array of linestring GEOGRAPHY values. The vertex ordering of each linestring determines the orientation of each polygon ring.
ST_MAXDISTANCEGets the longest distance between two non-empty GEOGRAPHY values.
ST_NPOINTSAn alias of ST_NUMPOINTS.
ST_NUMGEOMETRIESGets the number of geometries in a GEOGRAPHY value.
ST_NUMPOINTSGets the number of vertices in the a GEOGRAPHY value.
ST_PERIMETERGets the length of the boundary of the polygons in a GEOGRAPHY value.
ST_POINTNGets the point at a specific index of a linestring GEOGRAPHY value.
ST_REGIONSTATSComputes statistics describing the pixels in a geospatial raster image that intersect a GEOGRAPHY value.
ST_SIMPLIFYConverts a GEOGRAPHY value into a simplified GEOGRAPHY value, using tolerance.
ST_SNAPTOGRIDProduces a GEOGRAPHY value, where each vertex has been snapped to a longitude/latitude grid.
ST_STARTPOINTGets the first point of a linestring GEOGRAPHY value.
ST_TOUCHESChecks if two GEOGRAPHY values intersect and their interiors have no elements in common.
ST_UNIONGets the point set union of multiple GEOGRAPHY values.
ST_UNION_AGGAggregates over GEOGRAPHY values and gets their point set union.
ST_WITHINChecks if one GEOGRAPHY value contains another GEOGRAPHY value.
ST_XGets the longitude from a point GEOGRAPHY value.
ST_YGets the latitude from a point GEOGRAPHY value.
STARTS_WITHChecks if a STRING or BYTES value is a prefix of another value.
STDDEVAn alias of the STDDEV_SAMP function.
STDDEV_POPComputes the population (biased) standard deviation of the values.
STDDEV_SAMPComputes the sample (unbiased) standard deviation of the values.
STRING (JSON)Converts a JSON string to a SQL STRING value.
STRING (Timestamp)Converts a TIMESTAMP value to a STRING value.
STRING_AGGConcatenates non-NULL STRING or BYTES values.
STRPOSFinds the position of the first occurrence of a subvalue inside another value.
SUBSTRGets a portion of a STRING or BYTES value.
SUBSTRINGAlias for SUBSTR
SUMGets the sum of non-NULL values.
SUM (Differential Privacy)DIFFERENTIAL_PRIVACY-supported SUM.

Gets the differentially-private sum of non-NULL, non-NaN values in a query with a DIFFERENTIAL_PRIVACY clause.
TANComputes the tangent of X.
TANHComputes the hyperbolic tangent of X.
TEXT_ANALYZEExtracts terms (tokens) from text and converts them into a tokenized document.
TF_IDFEvaluates how relevant a term (token) is to a tokenized document in a set of tokenized documents.
TIMEConstructs a TIME value.
TIME_ADDAdds a specified time interval to a TIME value.
TIME_DIFFGets the number of unit boundaries between two TIME values at a particular time granularity.
TIME_SUBSubtracts a specified time interval from a TIME value.
TIME_TRUNCTruncates a TIME value at a particular granularity.
TIMESTAMPConstructs a TIMESTAMP value.
TIMESTAMP_ADDAdds a specified time interval to a TIMESTAMP value.
TIMESTAMP_BUCKETGets the lower bound of the timestamp bucket that contains a timestamp.
TIMESTAMP_DIFFGets the number of unit boundaries between two TIMESTAMP values at a particular time granularity.
TIMESTAMP_MICROSConverts the number of microseconds since 1970-01-01 00:00:00 UTC to a TIMESTAMP.
TIMESTAMP_MILLISConverts the number of milliseconds since 1970-01-01 00:00:00 UTC to a TIMESTAMP.
TIMESTAMP_SECONDSConverts the number of seconds since 1970-01-01 00:00:00 UTC to a TIMESTAMP.
TIMESTAMP_SUBSubtracts a specified time interval from a TIMESTAMP value.
TIMESTAMP_TRUNCTruncates a TIMESTAMP or DATETIME value at a particular granularity.
TO_BASE32Converts a BYTES value to a base32-encoded STRING value.
TO_BASE64Converts a BYTES value to a base64-encoded STRING value.
TO_CODE_POINTSConverts a STRING or BYTES value into an array of extended ASCII code points.
TO_HEXConverts a BYTES value to a hexadecimal STRING value.
TO_JSONConverts a SQL value to a JSON value.
TO_JSON_STRINGConverts a SQL value to a JSON-formatted STRING value.
TRANSLATEWithin a value, replaces each source character with the corresponding target character.
TRIMRemoves the specified leading and trailing Unicode code points or bytes from a STRING or BYTES value.
TRUNCRounds a number like ROUND(X) or ROUND(X, N), but always rounds towards zero and never overflows.
TYPEOFGets the name of the data type for an expression.
UNICODEGets the Unicode code point for the first character in a value.
UNIX_DATEConverts a DATE value to the number of days since 1970-01-01.
UNIX_MICROSConverts a TIMESTAMP value to the number of microseconds since 1970-01-01 00:00:00 UTC.
UNIX_MILLISConverts a TIMESTAMP value to the number of milliseconds since 1970-01-01 00:00:00 UTC.
UNIX_SECONDSConverts a TIMESTAMP value to the number of seconds since 1970-01-01 00:00:00 UTC.
UPPERFormats alphabetic characters in a STRING value as uppercase.

Formats ASCII characters in a BYTES value as uppercase.
VAR_POPComputes the population (biased) variance of the values.
VAR_SAMPComputes the sample (unbiased) variance of the values.
VARIANCEAn alias of VAR_SAMP.
VECTOR_SEARCHPerforms a vector search on embeddings to find semantically similar entities.