Made distinct easier to use

- The order of the projections no longer matter when distinct is used,
  distinct values will always appear first in the selection list