BigQuery

Fungsi SQL BigQuery

Data warehouse serverless dari Google Cloud. 220 fungsi tersedia.

Menampilkan 24 dari 220 fungsi

MOD

Math

Returns the remainder of dividing two numbers (modulo operation).

Tipe hasil: Same as input type

NORMALIZE

String

Normalizes a Unicode string to a canonical form. Useful for consistent string comparisons across different Unicode representations.

Tipe hasil: STRING

NORMALIZE_AND_CASEFOLD

String

Normalizes a Unicode string and applies case-folding for correct Unicode-aware case-insensitive comparisons.

Tipe hasil: STRING

NTH_VALUE

Window

Returns the value at the Nth position in the window frame.

Tipe hasil: Same as input expression

NTILE

Window

Divides rows within a partition into a specified number of buckets and assigns a bucket number to each row.

Tipe hasil: INT64

NULLIF

Conditional

Mengembalikan NULL jika kedua expression sama, otherwise mengembalikan expression1.

Tipe hasil: Type of expression1 or NULL

NVL

Conditional

Alias untuk IFNULL. Mengembalikan null_replacement jika expression NULL.

Tipe hasil: Type of expressions

OFFSET

Array

Mengakses elemen array menggunakan zero-based index.

Tipe hasil: Element type

ORDINAL

Array

Mengakses elemen array menggunakan one-based index.

Tipe hasil: Element type

PARSE_DATE

Date & Time

Parses a string into a DATE based on the specified format. The inverse of FORMAT_DATE.

Tipe hasil: DATE

PARSE_DATETIME

Date & Time

Converts a string into a DATETIME type based on the specified format.

Tipe hasil: DATETIME

PARSE_JSON

JSON

Converts a JSON string into the native JSON type.

Tipe hasil: JSON

PARSE_TIME

Date & Time

Converts a time string into a TIME type based on the specified format.

Tipe hasil: TIME

PARSE_TIMESTAMP

Date & Time

Converts a string to a TIMESTAMP type with timezone support.

Tipe hasil: TIMESTAMP

PERCENTILE_CONT

Window

Computes a continuous percentile value using linear interpolation across the values in a group.

Tipe hasil: FLOAT64

PERCENTILE_DISC

Window

Returns the actual value at the nearest percentile without interpolation.

Tipe hasil: Same as input expression

PERCENT_RANK

Window

Menghitung percentile rank relatif dari setiap baris. Nilai antara 0 dan 1, menunjukkan persentase baris yang lebih rendah.

Tipe hasil: FLOAT64

POWER

Math

Calculates base raised to the power of exponent (base^exponent).

Tipe hasil: FLOAT64

RADIANS

Math

Mengkonversi sudut dari derajat ke radian.

Tipe hasil: FLOAT64

RAND

Math

Generates a random number between 0 (inclusive) and 1 (exclusive).

Tipe hasil: FLOAT64

RANK

Window

Assigns a rank to each row. Rows with equal values receive the same rank, and there is a gap after ties.

Tipe hasil: INT64

REGEXP_CONTAINS

String

Returns TRUE if the value matches the regular expression. Useful for pattern matching and format validation.

Tipe hasil: BOOL

REGEXP_EXTRACT

String

Extracts the first substring that matches the regular expression. If the pattern has a capturing group, returns that group instead.

Tipe hasil: STRING

REGEXP_EXTRACT_ALL

String

Extracts all substrings that match the regular expression and returns them as an array.

Tipe hasil: ARRAY<STRING>