The SQL to review distribution across all segments

posted Oct 30, 2014, 7:08 PM by Sachchida Ojha

select gp_segment_id, count(*) , abs(count(*) - avg(count(*)) over(order by gp_segment_id rows between unbounded preceding and unbounded following))/count(*) skew

from bloattest
group by gp_segment_id
order by gp_segment_id
limit 100;

Comments