Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3610494
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:45:33+00:00 2026-05-18T21:45:33+00:00

I want to dynamically generate bands, that will then be grouped in reports. My

  • 0

I want to dynamically generate bands, that will then be grouped in reports.

My first thought was generate the bands by taking the minimum value and the maximum value and then dividing up the difference.

For instance suppose you had the salaries for a large group of people:

  • The lowest paid earns £12,000 a year and the highest earns £3,000,000
  • So I split that into 10 bands of similar size: (£3mill – £12k) / 10 = £298800
  • So my first band goes £12k to £310,800 and gets thousands of people in it
  • My second band goes £310k to £610k and has a few hundred
  • Every other band has a few people in each one

So then this isn’t actually very useful. If I were to manually create the bands I’d want roughly similar numbers in each, something like: £12k-£14k, £14k-£18k, £18k-£25k, £25-£35k, …, £1.5-£3million

This is just one example – there could be lots of different distributions.

I’m looking for an algorithm to generate the bands, so users would enter how many bands they want and the data would be grouped into that many bands with a similar number in each.

The banding needs to be quick – I can’t just loop through the entire dataset.

The application is C# on top of SQL, but solutions from other languages welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:45:34+00:00Added an answer on May 18, 2026 at 9:45 pm

    i think you are asking about how to query an existing dataset into the ‘bands’…

    if this is true, then Oracle supports NTILE aggregate functions fo rthis purpose. There should be equivalents in other SQL implementations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created some code that will dynamically generate a bunch of different LinkButtons. I've
So I want to dynamically generate a MIDI file on a web request.Coming from
I have a scenario where i want to dynamically generate a python script -
Given a String list val www = List(http://bloomberg.com, http://marketwatch.com); I want to dynamically generate
I want to do the following dynamically Generate numbers from 1 to 100 and
I'm just starting out with jQuery and want to use $(document).ready() to dynamically generate
I wrote a little Java servlet that would dynamically generate an image button given
I want to dynamically generate an input field based on the content of a
In my JSF/Facelets application, I want to dynamically generate a breadcrumb trail from a
I want to dynamically generate 8 new paragraphs with jQuery: http://jsfiddle.net/johnhoffman/Dfydn/ However, this snippet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.