add ordering to the individual queries
Merge pull request #855 from concerto/fix_ordering_of_activity

add ordering to the individual queries