 <p>If you want to obtain single row totals - let your outer query aggregate data too. With appropriate GROUP BY clause. <p>You have already grouped data per ID, Location, Class and Date - now group by higher granularity level. It is impossible to obtain <code>avg_phone_contacts_perid</code> while you are requesting separate row per each id. Unless your desire is to see the same value of <code>avg_phone_contacts_perid</code> in every row (for example to make a comparison) - this is possible to do by windows function <code>AVG(...) OVER (...)</code></p>