Need a help to write a query.
I have a table with three columns.
A,B,C

A = Identity column
B = Units
C = Datetime

The data in table looks like as follows
A B C
--------------------------------
1 2701 1-31-04 09:40am
2 2701 1-31-04 09:49am
3 2701 1-31-04 10:40am
4 2701 1-31-04 10:04am
5 2701 1-31-04 02:40pm
6 2701 1-31-04 03:35pm
7 2701 1-31-04 04:41pm
8 2701 1-31-04 05:40pm

Result of query should looks like as follows

B 9:00-2:00 2:00-5:00 5:00-10:00
----------------------------------------
2701 4 3 1

I want to group by Unit and by time buckets. Can anyone help me with this? Thanks in advance.