You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-11-27 08:21:15 +03:00
17 lines
597 B
Plaintext
17 lines
597 B
Plaintext
DROP DATABASE IF EXISTS mcs199_db;
|
|
CREATE DATABASE mcs199_db;
|
|
USE mcs199_db;
|
|
CREATE TABLE t1 (x INT, y MEDIUMINT, z CHAR(5))ENGINE=Columnstore;
|
|
INSERT INTO t1 VALUES (NULL, NULL, ''),(20, 1, 'aaa'),(39, 2, 'aaa'),(48, 3, 'bbb'),(57, 4, 'bbb'),(66, 5, 'aaa'),(75, 6, 'aaa'),(84, 7, 'bbb');
|
|
SELECT REGR_R2(y, x) FROM t1;
|
|
REGR_R2(y, x)
|
|
0.9814869668246445
|
|
SELECT z, REGR_R2(y, x) FROM t1 GROUP BY z ORDER BY z;
|
|
z REGR_R2(y, x)
|
|
NULL NULL
|
|
aaa 0.9798973217047071
|
|
bbb 1
|
|
SELECT REGR_R2(y) FROM t1;
|
|
ERROR HY000: Can't initialize function 'regr_r2'; regr_r2() requires two arguments
|
|
DROP DATABASE mcs199_db;
|