Compute running totals, moving averages, and many other statistics that need relative row references, within T-SQL queries.
Para a sua conveniência, incluímos o link para o Tradutor Google para as informações de produtos nas quais ainda não foram traduzidas. Lembre-se que traduções automáticas não são sempre precisas.
SQLRollingStats is a solution for SQL Server that extends and enhances your T-SQL programming environment by adding 30+ statistical window functions - allowing the computation of results per row that depend on values in other rows. All functions are capable of taking into account all rows so far processed, or just the last n rows where n is the specified window size. Functions include: sum, product, maximum, minimum, range, mid-range, first (in sequence), nth previous, average (mean), variance (sample & population), standard deviation (sample & population), geometric mean, harmonic mean, quadratic mean, median, quartile, inter-quartile range, tri-mean, percentile, percentile rank, exponential average (mean), exponential variance, exponential standard deviation, weighted average, weighted variance (sample & population), weighted standard deviation (sample & population), weighted power mean.
Easy to Use
All SQLRollingStats functions are implemented as types: you need only declare a variable of the appropriate type, assign it a starting value (usually '0') and then call its Result() method in your queries using the syntax @variable. Result(), specifying the input values and a row-number (since almost all forms of rolling statistics are only valid when processed in a given order). T-SQL's built-in ROW_NUMBER() function will usually suffice for the purpose - see the examples given in...