Locate a number within a range.(SQL).
Syntax
Partition (number,start,stop,interval)
Key
number The number to evaluate
start The start of the overall range of numbers.
stop The end of the overall range of numbers.
interval The interval spanned by each range.
The Partition() function can be used in an SQL query.
Example
SELECT Count(T_Sales.ItemID) AS CountSales,
Partition([Sale_Price],0,100000,5000) AS Pricebracket
FROM T_Sales
WHERE (T_Sales.Sale_Price>0)
GROUP BY Partition([Sale_Price],0,100000,5000);
“Love's dominion, like a king's, admits of no partition” ~ Ovid
Related:
Avg (SQL) - Average.
Count - Count records.
Max - Return the maximum value from a query.
Min - Return the minimum value from a query.
Sum (SQL) - Add up the values in a query result set.