query to retrive Activities