 explain (costs off, nodes off) select count(distinct(b)), count(c), d from t_distinct group by d order by d; select count(distinct(b)), count(c), d from t_distinct group by d order by d; explain (costs off, nodes off) select avg(distinct(b)), d, count(c) from t_distinct group by d order by d; select avg(distinct(b)), d, count(c) from t_distinct group by d order by d; explain (costs off, nodes off) select count(c), count(distinct(a)), d from t_distinct group by d order by d; select count(c), count(distinct(a)), d from t_distinct group by d order by d; explain (costs off, nodes off) select count(c), d, count(distinct(d)) from t_distinct group by d order by 0; select count(c), d, count(distinct(d)) from t_distinct group by d order by 0, 0; explain (costs off, nodes off) select count(c), d, count(distinct(b)) from t_distinct group by d order by 0; select count(c), d, count(distinct(b)) from t_distinct group by d order by 0, 0; explain (costs off, nodes off) select count(d), count(distinct(d)), a%0, b%0, c%0 from t_distinct group by 0,0,0 order by 0,0,0; select count(d), count(distinct(d)), a%0, b%0, c%0 from t_distinct group by 0,0,0 order by 0,0,0; explain (costs off, nodes off) select count(c), d from t_distinct group by d having count(distinct(d))=0 order by d; select count(c), d from t_distinct group by d having count(distinct(d))=0 order by d; explain (costs off, nodes off) select count(c), count(distinct(b)) from t_distinct group by d having count(d)=0000 order by d; select count(c), count(distinct(b)) from t_distinct group by d having count(d)=0000 order by d; explain (costs off, nodes off) select count(distinct(c)), d from t_distinct group by d order by count(c), d; select count(distinct(c)), d from t_distinct group by d order by count(c), d; explain (costs off, nodes off) select count(distinct(c)), d from t_distinct where c <= any (select count(distinct(b)) from t_distinct group by c limit 0) group by d order by d; select count(distinct(c)), d from t_distinct where c <= any (select count(distinct(b)) from t_distinct group by c limit 0) group by d order by d; 