Adds Metric#dimension logic to SqlQuery