You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
22 lines
670 B
Plaintext
22 lines
670 B
Plaintext
DROP DATABASE IF EXISTS `mcol 3785`;
|
|
DROP DATABASE IF EXISTS `mcol 3785 2`;
|
|
CREATE DATABASE `mcol 3785`;
|
|
CREATE DATABASE `mcol 3785 2`;
|
|
USE `mcol 3785`;
|
|
CREATE TABLE src (c0 INT, c1 INT);
|
|
INSERT INTO src VALUES (1,1),(1,1),(1,1),(2,2),(2,2),(2,2),(3,3),(3,3),(3,3);
|
|
CREATE TABLE `target table` ENGINE=ColumnStore AS SELECT c0, COUNT(c0) FROM `mcol 3785`.src GROUP BY c0;
|
|
SELECT * FROM `target table`;
|
|
c0 COUNT(c0)
|
|
1 3
|
|
2 3
|
|
3 3
|
|
CREATE TABLE `mcol 3785 2`.`target table` ENGINE=ColumnStore AS SELECT c0, COUNT(c0) FROM `mcol 3785`.src GROUP BY c0;
|
|
SELECT * FROM `mcol 3785 2`.`target table`;
|
|
c0 COUNT(c0)
|
|
1 3
|
|
2 3
|
|
3 3
|
|
DROP DATABASE `mcol 3785`;
|
|
DROP DATABASE `mcol 3785 2`;
|