   (let [field             (->rvalue field)
         breakout-field    (->rvalue breakout-field)
         sort-by-breakout? (= field breakout-field)
-        ag-field          (if (= ag-type :distinct) :count ag-type)]
+        ag-field          (if (= ag-type :distinct) :distinct___count ag-type)]
     (assoc druid-query :metric (match [sort-by-breakout? direction]
                                  [true  :ascending]  {:type :alphaNumeric}
                                  [true  :descending] {:type :inverted, :metric {:type :alphaNumeric}}

                                                           {:type :fieldAccess, :fieldName :___count}]}]}

               [:distinct _] {:aggregations [{:type       :cardinality
                                              :name       :count
                                              :fieldNames [(->rvalue ag-field)]}]}
               [:sum      _] {:aggregations [(ag:doubleSum ag-field :sum)]}
               [:min      _] {:aggregations [(ag:doubleMin ag-field)]}

        columns    (keys (first results))
        getters    (columns->getter-fns columns)]
    ;; rename any occurances of `:timestamp___int` to `:timestamp` in the results so the user doesn't know about our behind-the-scenes conversion
    ;; and apply any other post-processing on the value such as parsing some units to int and rounding up approximate cardinality values.
    {:columns   (vec (replace {:timestamp___int :timestamp :distinct___count :count} columns))
     :rows      (for [row results]
                  (for [getter getters]
                    (getter row)))
