mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 19:32:07 +00:00
18 lines
913 B
MySQL
18 lines
913 B
MySQL
|
select count(), count(a), max(a), min(a), avg(a), sum(a), any(a)
|
||
|
from (select cast(Null,'Nullable(Float64)') a);
|
||
|
|
||
|
select countMerge(cnts), countMerge(cntsa), maxMerge(maxs), minMerge(mins), avgMerge(avgs), sumMerge(sums), anyMerge(anys) from (
|
||
|
select countState() cnts, countState(a) cntsa, maxState(a) maxs, minState(a) mins, avgState(a) avgs, sumState(a) sums, anyState(a) anys
|
||
|
from (select cast(Null,'Nullable(Float64)') a));
|
||
|
|
||
|
|
||
|
select '--- empty resultset ---';
|
||
|
|
||
|
|
||
|
select count(), count(a), max(a), min(a), avg(a), sum(a), any(a)
|
||
|
from (select cast(1,'Nullable(Float64)') a) where a =0;
|
||
|
|
||
|
select countMerge(cnts), countMerge(cntsa), maxMerge(maxs), minMerge(mins), avgMerge(avgs), sumMerge(sums), anyMerge(anys) from (
|
||
|
select countState() cnts, countState(a) cntsa, maxState(a) maxs, minState(a) mins, avgState(a) avgs, sumState(a) sums, anyState(a) anys
|
||
|
from (select cast(1,'Nullable(Float64)') a) where a =0 );
|