|
Execute the following Microsoft SQL Server Transact-SQL demonstration scripts in Management Studio Query Editor.
USE AdventureWorks;
SELECT TotalSickHours=sum(SickLeaveHours),
AverageSickHours=avg(SickLeaveHours)
FROM HumanResources.Employee
TABLESAMPLE SYSTEM (3 * 5 PERCENT);
/* TotalSickHours AverageSickHours
1797 47 */
Related article:
Limiting Result Sets by Using TABLESAMPLE
|