Create partition queries
Raymond Starkey, Director of ACCESSible IT Ltd., provided us with an example that he has used to teach Access users about using the Partition function to create a frequency distribution. As he says, “no one ever mentions these but they are so powerful they need a mention.”
Note:Raymond’s example uses the Northwind sample database that was provided with Access 2000-2003. See below for an example that uses data from the Northwind 2007 database.
Example from Northwind 2007
Query Design view:
The SQL for this query is:
SELECT Partition([Shipping Fee],0,200,10) AS Range, Count(Orders.[Shipping Fee]) AS [CountOfShipping Fee]
FROM Orders
GROUP BY Partition([Shipping Fee],0,200,10);
Here’s how it looks in Datasheet view:

Thanks Raymond!