Hi there, We have a table which keeps track of activities of all the members who attend the different events.Activity Type ID 5 means joined the event and Activity Type ID 6 meand left the event. Now i am working on a query which will give me result with 6 columns each as count of people in each hour in last 6 hours.For example if i run the query at 8 PM then there are 6 columns with count of members in each hour. [At 7 PM] [At 6 PM] [At 5 PM] [At 4 PM] [At 3 PM] [At 2 PM] 4 3 11 2 0 5 The issue which i am facing is if one member joins the event at 3 PM (So there will be a record with Activitt 5) and leave the event at 6 PM (Activity 6), i need to keep track of that member in each hour between them till it leaves the event and query sees the record for activity type 6 for that member and that event.So that member will be counted in each hour between joining and leaving time. Can someone suggest how to keep track of these members? Thanks!