Sorts the summary based upon the user's selection. The base variant of this is usually adequte.
$order: The order selected in the UI.
function summary_sort($order, $by = NULL) {
$this->query
->add_orderby(NULL, NULL, $order, !empty($by) ? $by : $this->name_alias);
}