Updates to code to implement sampling and add experimental settings.
Removed redundant order by
Added optimization for single groupby and multiple aggregates