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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

group data

Status
Not open for further replies.

ridhirao22

Programmer
Aug 27, 2010
140
US
I have a table with order_number, order_date, qty, amount.
I need to group amount data in 50’s ( like 50,100,150,200..6000) and count the orders and sum qty for each bucket. I came across the width_bucket function but I don’t understand how I tell the bucket width. Is there any easy way of do this?

Please advice.

TIA,
RR
 
I googled and found an example at May I suggest that you create a table, populate it with some sample data and then try it out.

If you then have trouble, post the create table statement, insert statement and your query. That will make it much more likely that someone on the forum will be able to help.

Regards

T
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top