1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-27 08:21:15 +03:00
Files
mariadb-columnstore-engine/mtr/basic/r/mcs198_regr_intercept_function.result
mariadb-RomanNavrotskiy 73b4147cf3 move mtr suites here
2021-01-31 01:38:31 +02:00

17 lines
665 B
Plaintext

DROP DATABASE IF EXISTS mcs198_db;
CREATE DATABASE mcs198_db;
USE mcs198_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_INTERCEPT(y, x) FROM t1;
REGR_INTERCEPT(y, x)
-1.415580568720379
SELECT z, REGR_INTERCEPT(y, x) FROM t1 GROUP BY z ORDER BY z;
z REGR_INTERCEPT(y, x)
NULL NULL
aaa -1.1792849631966351
bbb -2.3333333333333335
SELECT REGR_INTERCEPT(y) FROM t1;
ERROR HY000: Can't initialize function 'regr_intercept'; regr_intercept() requires two arguments
DROP DATABASE mcs198_db;