 <p>You can use a subquery to make calculations by day and after that make calculations by country. The result SQL query can be like this:</p> <pre><code>-- Make calculation by country, from the subquery SELECT Country, UniqueDays = count(TheDay), CallsUserPerDay = sum(CallsPerUser), FinalCalc = sum(CallsPerUser) / cast(count(TheDay) as DECIMAL) FROM ( -- SUBQUERY: Make calculations by day SELECT c.Country, c.ActualStart as TheDay, Calls = COUNT(c.CallID), Users = COUNT(Distinct c.UserID), COUNT(c.CallID) /CAST(COUNT(Distinct c.UserID) AS DECIMAL) as CallsPerUser FROM CallInfo as c WHERE (c.Status = 3) GROUP BY c.Country, c.ActualStart ) data GROUP BY Country </code></pre> <p><strong>Note:</strong> I avoid use precission on DECIMAL casting to avoid rounding on final result.</p>