Skip to Content
0
Former Member
Jan 05, 2012 at 10:54 AM

Problem with bucket

35 Views

Hi all,

I've a query with four fields : Year,Student_ID,Subject_ID,Marks

Now I want a table where I want the number of students in buckets of different marks. Lets say the total number of students is 100, total marks is 1000 and there are data for only three years 2009,2010 and 2011.

I want number of students per year that have marks greater than 900 (>900), that have marks greater than 500 but less or equals to 900 (>500<=900) and so on.

These buckets are hardcoded in the table.

Marks 2009 2010 2011

[>900] 6 12 10

[>500<=900] 67 72 75

[<500] 27 16 15

Can someone please help me on this?

Thanks in advance.