summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/r/innodb-agregate.result
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/innodb/r/innodb-agregate.result
parentInitial commit. (diff)
downloadmariadb-upstream.tar.xz
mariadb-upstream.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--mysql-test/suite/innodb/r/innodb-agregate.result21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/innodb-agregate.result b/mysql-test/suite/innodb/r/innodb-agregate.result
new file mode 100644
index 00000000..d3e096c7
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb-agregate.result
@@ -0,0 +1,21 @@
+create table t2 (a smallint(6) not null, b int(10) not null, name varchar(20), primary key(a,b), key(name)) engine=InnoDB;
+insert into t2 values (8355,3,"sanja"),(8355,4,"wlad"),(8366,5, "lawrin"),(8366,6,"markusjm");
+select count(distinct name) from t2 where a=8366 and b>=5 and b<=5;
+count(distinct name)
+1
+select count(distinct name) from t2 where a=8366 and b=5;
+count(distinct name)
+1
+select count(distinct name) from t2 where a=8366 and b between 5 and 5.5;
+count(distinct name)
+1
+select sum(distinct a) from t2 where a=8366 and b>=5 and b<=5;
+sum(distinct a)
+8366
+select sum(distinct a) from t2 where a=8366 and b=5;
+sum(distinct a)
+8366
+select sum(distinct a) from t2 where a=8366 and b between 5 and 5.5;
+sum(distinct a)
+8366
+drop table t2;