drop table agg; create table agg(n integer); begin for i in 0..1000 loop insert into agg values(i); end loop; end; / show errors; select 'Population' d,count(n),avg(n),stddev(n),stddev_pop(n),stddev_samp(n) from agg union select 'Sample',count(n),avg(n),stddev(n),stddev_pop(n),stddev_samp(n) from agg where mod(n,2) = 0 union select 'Sample',count(n),avg(n),stddev(n),stddev_pop(n),stddev_samp(n) from agg where mod(n,10) = 0 union select 'Sample',count(n),avg(n),stddev(n),stddev_pop(n),stddev_samp(n) from agg where mod(n,100) = 0; 得到的结果是