 <p>To get the aggregate of the whole set you can use an empty <code>OVER</code> clause</p> <pre><code>WITH T(Result) AS (SELECT FloatColumn - Avg(FloatColumn) OVER() - Stdev(FloatColumn) OVER () FROM Data) SELECT Count(*), Result FROM T GROUP BY Result </code></pre>