         text-headers     (concat (pu/remove-vector-items plot-base-headers
                                                          (when-not confidence? :confidence))
                                  (get-ext-headers plots :extra_plot_info "pl_"))
-        number-headers   (get-value-distribution-headers survey-questions)
+        number-headers   (-> survey-questions (sort-questions) (get-value-distribution-headers))
         headers-out      (->> (concat text-headers number-headers)
                               (map #(-> % name csv-quotes))
                               (str/join ",")

    (.format (SimpleDateFormat. "YYYY-MM-dd HH:mm")
             pg-time)))

;;;
;;; Dump aggregate
;;;

            text-headers     (concat sample-base-headers
                                     (get-ext-headers samples :extra_plot_info "pl_")
                                     (get-ext-headers samples :extra_sample_info "smpl_")
                                     (->> survey-questions
                                          (sort-questions)
                                          (map (fn [[_ {:keys [question]}]] (or question "not-found")))))
            headers-out      (->> text-headers
                                  (map #(-> % name csv-quotes))
                                  (str/join ",")
