finish extract distinct userid and distinct advid