Add standardSelectDistinct() function to help fork queries based on whether the order...