Change existing static db_query to dynamic db_select for user activity stats
Remove redundant nid from db_select query
Change comment count query to dynamic db_select for user activity stats