case DATE:
column = "s.created_at";
break;
case METRIC:
if (metric.isNumericType()) {
<BUG>column = (period != null ? "pm.variation_value_" + period : "pm.value");
</BUG>
} else {
<BUG>column = "pm.text_value";
</BUG>
}

case DATE:
column = "s.created_at";
break;
case METRIC:
if (metric.isNumericType()) {
column = (period != null ? "pmsort.variation_value_" + period : "pmsort.value");
} else {
column = "pmsort.text_value";
