Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping in increments of $100,000 2

Status
Not open for further replies.

mmiram

IS-IT--Management
Feb 4, 2005
45
US
Hi all:

I have an access table that shows the transactions for our company's transactions. The fields in the table are:

address
name
sub
Cprice

Cprice is the price field. The values in this field vary from $100,000 to $2,000,000. I want to write a query that counts the number of addresses and sums up the cprice in increments of $100,000 starting from $100,000 going up to $2,000,000. How would I do that? Logically the concept would be

Select count(address), sum(cprice)
from tbl1
group by (increments of $100,000)

I don't even know if it is possible without using some kind of ASP coding or VBA. Any help would be appreciated.

Thanks.
 
You may consider the Partition function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top