Aggregate
BigQuery
COVAR_SAMP
Menghitung kovarians sample antara dua kolom numerik.
Tipe hasil:
FLOAT64Syntax
SQL
COVAR_SAMP(x, y)Parameter
xFLOAT64wajib
Kolom numerik pertama
yFLOAT64wajib
Kolom numerik kedua
Contoh Penggunaan
Sample Covariance
SQL
1 SELECT COVAR_SAMP(study_hours, test_score) AS study_score_cov 2 FROM students;
Kovarians jam belajar dan nilai test.
Hasil
study_score_cov: 45.2