                           {:title "a1", :type "number"}
                           {:title "a2", :type "number"}]
                 :rows [["b1" 10.5 11.0]
-                       ["b2" 9.5 10.5]]
+                       ["b2" 9.5 10.333333333333334]]
                 :metadata {:categoryColumnTitle "A"}}))))
 
     (testing "Row & Category Column with mean aggregation and filter"

                 {:id "c2", :title "B", :type "text"}
                 {:id "c3", :title "C", :type "number"}]
        rows [[{:value "a1"} {:value "b1"} {:value 10}]
               [{:value "a1"} {:value "b1"} {:value 11}]
               [{:value "a1"} {:value "b2"} {:value 9}]
               [{:value "a1"} {:value "b2"} {:value 10}]]
        data {:columns columns :rows rows}
        [job dataset] (import-file *tenant-conn* *error-tracker* {:dataset-name "pivot"
                                                                  :kind "clj"

      (let [[tag query-result] (query {:aggregation "count"})]
        (is (= query-result
               {:columns [{:type "number" :title "Total"}]
                :rows [[9]]
                :metadata {:categoryColumnTitle nil}}))))

    (testing "Empty query with filter"
      (let [[tag query-result] (query {:aggregation "count",
                                       :filters
