|
|
|
|
Quelle count_distinct.result
Sprache: Lisp
|
|
DTVA
create table java.lang.StringIndexOutOfBoundsException: Range [35, 32) out of bounds for length 44
create tablevoid SetValuejava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 48
insert into t2 values ('boolGetBinValue(oid*,, ) override
insert into t2 values (' (void)override { Sdate; }
insert into t2 values ('003','Cowboychar *GetCharString( *);
insert into t2 values ('000','Anonymous','Wanna char buf,int len)override;
insert bool ( vp,PCSZ fmt) override;
insert into t2 values ('005','EveryoneBuys','This very book');
insert into t2 values ('006',''Itis );
insert into t2 values ('007','BerkAuthor','Cool. bool SetFormat(PGLOBAL g, PCSZ fmt, intint =0;
java.lang.StringIndexOutOfBoundsException: Range [26, 6) out of bounds for length 57
intot3 001,New Public ''');
insert into t3 values(' void (oid)
insert into static int void){ ;}
insert into t3 values('004',
insert java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
struct (java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 40
insert // Defaul/Default not to be used
insert into t3 values('007',' DTVALvoid):d(){}
insert
insert into t1 values /
insert into java.lang.StringIndexOutOfBoundsException: Range [21, 14) out of bounds for length 59
insert Pdtp
insert into t1 values ('Berkeley Public2 char Sdate
insert into t1 values ( DefYear; // Used by ExtractDate
select t2.iLen /Used CHARscalar function
isbn city libname a
007 Berkeley Berkeley Public1 1
007 Berkeley Berkeley Public2 1
000 New York New York Public Libra 6
001 New York NYC Lib 1
006 San Fran San Fransisco Public 1
select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct t1.libname) > 1;
isbn city libname a
007 Berkeley Berkeley Public1 2
000 New York New York Public Libra 2
select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join t1 on t3.libname=t1.libname left join t2 on t3.isbn=t2.isbn group by city having count(distinct concat(t1.libname,'a')) > 1;
isbn city libname a
007 Berkeley Berkeley Public1 2
000 New York New York Public Libra 2
select t2.isbn,city,@bar:=t1.libname,count(distinct t1.libname) as a
from t3 left join t1 on t3.libname=t1.libname left join t2
on t3.isbn=t2.isbn group by city having count(distinct
t1.libname) > 1;
isbn city @bar:=t1.libname a
007 Berkeley Berkeley Public1 2
000 New York New York Public Libra 2
SELECT @bar;
@bar
Berkeley Public2
select t2.isbn,city,concat(@bar:=t1.libname),count(distinct t1.libname) as a
from t3 left join t1 on t3.libname=t1.libname left join t2
on t3.isbn=t2.isbn group by city having count(distinct
t1.libname) > 1;
isbn city concat(@bar:=t1.libname) a
007 Berkeley Berkeley Public1 2
000 New York New York Public Libra 2
SELECT @bar;
@bar
Berkeley Public2
drop table t1, t2, t3;
create table t1 (f1 int);
insert into t1 values (1);
create table t2 (f1 int,f2 int);
select t1.f1,count(distinct t2.f2),count(distinct 1,NULL) from t1 left join t2 on t1.f1=t2.f1 group by t1.f1;
f1 count(distinct t2.f2) count(distinct 1,NULL)
1 0 0
drop table t1,t2;
create table t1 (f int);
select count(distinct f) from t1;
count(distinct f)
0
drop table t1;
create table t1 (a char(3), b char(20), primary key (a, b));
insert into t1 values ('ABW', 'Dutch'), ('ABW', 'English');
select count(distinct a) from t1 group by b;
count(distinct a)
1
1
drop table t1;
create table t1 (f1 int, f2 int);
insert into t1 values (0,1),(1,2);
select count(distinct if(f1,3,f2)) from t1;
count(distinct if(f1,3,f2))
2
drop table t1;
create table t1 (i int);
insert into t1 values (0), (1);
create view v1 as select * from t1;
select count(distinct i) from v1;
count(distinct i)
2
drop table t1;
drop view v1;
create table t1 (user_id char(64) character set utf8);
insert t1 values(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17);
set @@tmp_table_size = 1024;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1024'
select count(distinct user_id) from t1;
count(distinct user_id)
17
alter table t1 modify user_id char(128) character set utf8;
select count(distinct user_id) from t1;
count(distinct user_id)
17
drop table t1;
set @@tmp_table_size = default;
create table t1 (
a VARCHAR(1020),
b int
);
insert into t1 values
( 0 , 1 ),
( 1 , 2 ),
( 2 , 3 ),
( 3 , 4 ),
( 4 , 5 ),
( 5 , 6 ),
( 6 , 7 ),
( 7 , 8 ),
( 8 , 9 ),
( 9 , 10 ),
( 0 , 11 ),
( 1 , 12 ),
( 2 , 13 ),
( 3 , 14 );
set @@tmp_table_size=1024;
Warnings:
Warning 1292 Truncated incorrect tmp_table_size value: '1024'
select count(distinct a) from t1;
count(distinct a)
10
drop table t1;
set @@tmp_table_size = default;
#
# End of 5.5 tests
#
#
# MDEV-26452 SIGSEGV in Item::cleanup from Item::cleanup_processor
#
create table t (a int,b date,primary key(a,b));
select b,count(distinct a) from t group by b having b is null;
b count(distinct a)
drop table t;
#
# End of 10.7 tests
#
¤ Dauer der Verarbeitung: 0.9 Sekunden
¤
*Bot Zugriff
|
|
2026-11-24
|
|
|
|
|