Isn&#x27;t this in postgres 9.6 anyway, due to the parallel sequential scans?<p>i.e. if your aggregate function is defined with `PARALLEL SAFE`, then this should magically work anyway. Yes?<p>(I&#x27;m aware this solution works with postgres 9.5 too)