Original Post
Hi, Lets say i have a database with tons of records where one of the fields is age. And i want to know the number of records where age is between 0 and 10 yo, 10 and 20... and so on... Whats the best way to do this? Notice: I dont want to have one int variable for each age interval. For example: Record 1: Age=5 Record 2: Age=12 Record 3: Age=76 Record 4: Age=34 Record 5: Age=23 Record 6: Age=87 Record 7: Age=4 Record 8: Age=98 Record 9: Age=101 Record 10: Age=54 Record 11: Age=67 ... the output would be: 0-10: 2 10-20:1 20-30:1 30-40:1 40-50:0 50-60:1 60-70:1 70-80:1 80-90:1 90-100:1 100-110:1 Thanks