BigQuery

Fungsi SQL BigQuery

Data warehouse serverless dari Google Cloud. 220 fungsi tersedia.

Menampilkan 24 dari 220 fungsi

SIGN

Math

Returns the sign of a number: -1, 0, or 1.

Tipe hasil: INT64 or FLOAT64

SIN

Math

Menghitung nilai sinus dari sudut dalam radian.

Tipe hasil: FLOAT64

SPLIT

String

Splits a string into an array based on a delimiter. Very useful for parsing CSV-style data.

Tipe hasil: ARRAY<STRING>

SQRT

Math

Calculates the square root of a number.

Tipe hasil: FLOAT64

STARTS_WITH

String

Checks whether a string begins with a specified prefix. Returns a boolean.

Tipe hasil: BOOL

STDDEV

Aggregate

Calculates the sample standard deviation of numeric values. Measures how spread out the data is from its mean. An alias for STDDEV_SAMP.

Tipe hasil: FLOAT64

STDDEV_POP

Aggregate

Calculates the population standard deviation of numeric values. Uses the N divisor formula (not N-1), suitable when the data represents an entire population.

Tipe hasil: FLOAT64

STDDEV_SAMP

Aggregate

Calculates the sample standard deviation of numeric values. Uses the N-1 divisor formula (Bessel's correction), suitable for sample data that represents a larger population.

Tipe hasil: FLOAT64

STRING_AGG

Aggregate

Concatenates string values from multiple rows into a single string with a specified delimiter. Very useful for creating lists or comma-separated values in BigQuery.

Tipe hasil: STRING

STRPOS

String

Finds the first position of a substring within a string. A simplified version of INSTR.

Tipe hasil: INT64

ST_AREA

Geography

Menghitung luas area dari objek GEOGRAPHY polygon dalam meter persegi.

Tipe hasil: FLOAT64

ST_ASGEOJSON

Geography

Mengkonversi GEOGRAPHY ke GeoJSON string.

Tipe hasil: STRING

ST_ASTEXT

Geography

Mengkonversi GEOGRAPHY ke Well-Known Text (WKT) string.

Tipe hasil: STRING

ST_CONTAINS

Geography

Memeriksa apakah geography_1 sepenuhnya mengandung geography_2.

Tipe hasil: BOOL

ST_DISTANCE

Geography

Menghitung jarak terpendek antara dua objek GEOGRAPHY dalam meter.

Tipe hasil: FLOAT64

ST_GEOGFROMTEXT

Geography

Membuat GEOGRAPHY dari Well-Known Text (WKT) string.

Tipe hasil: GEOGRAPHY

ST_GEOGPOINT

Geography

Membuat GEOGRAPHY point dari koordinat longitude dan latitude.

Tipe hasil: GEOGRAPHY

ST_INTERSECTS

Geography

Memeriksa apakah dua objek GEOGRAPHY memiliki intersection (bersinggungan atau overlap).

Tipe hasil: BOOL

ST_LENGTH

Geography

Menghitung panjang total dari linestring atau perimeter polygon dalam meter.

Tipe hasil: FLOAT64

ST_UNION

Geography

Menggabungkan dua objek GEOGRAPHY menjadi satu. ST_UNION_AGG untuk aggregate.

Tipe hasil: GEOGRAPHY

SUBSTR

String

Extracts a portion of characters from a string starting at a specified position. An alias for SUBSTRING, highly useful for data extraction and parsing.

Tipe hasil: STRING

SUBSTRING

String

Extracts a portion of characters from a string. Identical to SUBSTR, available for standard SQL compatibility.

Tipe hasil: STRING

SUM

Aggregate

Calculates the total sum of numeric values in a column. Supports multiple numeric types and is highly efficient for large-scale data analysis in BigQuery.

Tipe hasil: Same as input type (INT64, FLOAT64, NUMERIC, or BIGNUMERIC)

TAN

Math

Menghitung nilai tangen dari sudut dalam radian.

Tipe hasil: FLOAT64