   "Get mes based on pulses
   TODO: characterize by non-user account emails, # emails"
   []
-  (let [pulses (db/select 'Pulse)
-        pulsecards (db/select 'PulseCard)
-        pulsechannels (db/select 'PulseChannel)]
+  (let [pulses (db/select ['Pulse :id :creator_id])
+        pulsecards (db/select ['PulseCard :id :card_id :pulse_id])
+        pulsechannels (db/select ['PulseChannel :channel_type :schedule_type])]
     {:pulses (count pulses)
      :pulse_types (frequencies (map :channel_type pulsechannels))
      :pulse_schedules (frequencies (map :schedule_type pulsechannels))

                     :metric (metric-metrics)
                     :group (group-metrics)
                     :label (label-metrics)
                     :execution (execution-metrics)}}))



  "Get metrics based on questions
  TODO characterize by # executions and avg latency"
  []
  (let [questions (db/select ['Card :id :query_type])]
    {:questions (apply add-summaries (map question-dims questions))}))

(defn- dashboard-metrics
  "Get metrics based on dashboards
  TODO characterize by # of revisions, and created by an admin"
  []
  (let [dashboards (db/select ['Dashboard :id :creator_id])
        dashcards (db/select ['DashboardCard :id :card_id :dashboard_id])]
    {:dashboards (count dashboards)
     :num_dashs_per_user (medium-histogram dashboards :creator_id)
     :num_cards_per_dash (medium-histogram dashcards :dashboard_id)
