BigQuery

Fungsi SQL BigQuery

Data warehouse serverless dari Google Cloud. 220 fungsi tersedia.

Menampilkan 24 dari 220 fungsi

FORMAT_TIMESTAMP

Date & Time

Formats a TIMESTAMP value into a string. Supports timezone for accurate display.

Tipe hasil: STRING

GENERATE_ARRAY

Array

Membuat array berisi sequence of numbers.

Tipe hasil: ARRAY<INT64> or ARRAY<FLOAT64>

GENERATE_DATE_ARRAY

Array

Membuat array berisi sequence of dates.

Tipe hasil: ARRAY<DATE>

GENERATE_TIMESTAMP_ARRAY

Array

Membuat array berisi sequence of timestamps.

Tipe hasil: ARRAY<TIMESTAMP>

GENERATE_UUID

String

Menghasilkan UUID (Universally Unique Identifier) versi 4 secara random.

Tipe hasil: STRING

GREATEST

Math

Mengembalikan nilai terbesar dari daftar ekspresi.

Tipe hasil: Same as input type

IEEE_DIVIDE

Math

Performs division following the IEEE 754 standard, returning infinity or NaN instead of an error.

Tipe hasil: FLOAT64

IF

Conditional

Mengembalikan satu nilai jika kondisi TRUE, nilai lain jika FALSE.

Tipe hasil: Type of result expressions

IFF

Conditional

Alias untuk IF. Mengembalikan true_result jika condition TRUE.

Tipe hasil: Type of result expressions

IFNULL

Conditional

Mengembalikan expression jika tidak NULL, otherwise mengembalikan null_replacement.

Tipe hasil: Type of expressions

INITCAP

String

Capitalizes the first letter of each word and lowercases the rest. Title case transformation.

Tipe hasil: STRING

INSTR

String

Finds the position of a substring within a string. Supports searching from a specific position and locating the nth occurrence.

Tipe hasil: INT64

JSON_ARRAY

JSON

Creates a JSON array from the provided values.

Tipe hasil: JSON

JSON_ARRAY_LENGTH

JSON

Returns the number of elements in a JSON array.

Tipe hasil: INT64

JSON_EXTRACT

JSON

Mengekstrak nilai dari JSON menggunakan JSONPath dan mengembalikan sebagai JSON.

Tipe hasil: JSON

JSON_EXTRACT_ARRAY

JSON

Mengekstrak array dari JSON dan mengembalikan sebagai ARRAY<JSON>.

Tipe hasil: ARRAY<JSON>

JSON_EXTRACT_SCALAR

JSON

Mengekstrak nilai scalar dari JSON dan mengembalikan sebagai STRING.

Tipe hasil: STRING

JSON_EXTRACT_STRING_ARRAY

JSON

Mengekstrak array of scalars dari JSON sebagai ARRAY<STRING>.

Tipe hasil: ARRAY<STRING>

JSON_KEYS

JSON

Returns an array containing all keys from a JSON object.

Tipe hasil: ARRAY<STRING>

JSON_OBJECT

JSON

Creates a JSON object from the provided key-value pairs.

Tipe hasil: JSON

JSON_QUERY

JSON

Extracts a JSON value using JSONPath (SQL standard compliant).

Tipe hasil: JSON

JSON_QUERY_ARRAY

JSON

Extracts an array from a native JSON type as ARRAY<JSON>.

Tipe hasil: ARRAY<JSON>

JSON_TYPE

JSON

Returns the type of a JSON value (object, array, string, number, boolean, or null).

Tipe hasil: STRING

JSON_VALUE

JSON

Extracts a scalar value from JSON as a STRING (SQL standard compliant).

Tipe hasil: STRING