   {:questions (merge-count-maps (for [{query-type :query_type} (db/select [Card :query_type])]
                                   (let [native? (= (keyword query-type) :native)]
                                     {:total  1
-                                     :native (one-if native?)
-                                     :gui    (one-if (not native?))})))})
+                                     :native native?
+                                     :gui    (not native?)})))})
 
 (defn- dashboard-metrics
   "Get metrics based on dashboards

  []
  {:databases (merge-count-maps (for [{is-full-sync? :is_full_sync} (db/select [Database :is_full_sync])]
                                  {:total    1
                                   :analyzed (one-if is-full-sync?)}))})


(defn- table-metrics

            [metabase.util :as u])
  (:import java.util.Date))

(defn- merge-count-maps
  "Merge sequence of maps MS by summing counts inside them.
   Non-integer values are allowed; truthy values are considered to add a count of `1`, while non-truthy
   values do not affect the result count."
  [ms]
  (reduce (partial merge-with +)
          (for [m ms]
            (m/map-vals #(cond
                           (number? %) %
                           %           1
                           :else       0)
                        m))))

(def ^:private ^:const ^String metabase-usage-url "https://xuq0fbkk0j.execute-api.us-east-1.amazonaws.com/prod")

