All pastes #208920 Raw Edit

Untitled

public text v1 · immutable
#208920 ·published 2006-10-18 21:58 UTC
rendered paste body
select distinct loc,
  count(loc) over (partition by loc) subtotal, 
  count(loc) over () total,
  (count(loc) over (partition by loc)) / (count(loc) over ()) * 100 dshare
from cust
order by loc;