                :selection {:from [:certnames]}
                :alias "latest_report_id"
                :subquery? false
-               :source-tables #{:latest_report_id}}))
+               :source-tables #{:certnames}}))
 
 (def environments-query
   "Basic environments query, more useful when used with subqueries"

(s/defrecord Query
    [projections :- {s/Str column-schema}
     selection
     source-tables :- #{s/Keyword}
     alias where subquery? entity call
     group-by limit offset order-by])

                                                      :foreign-columns ["name"]}})

               :alias "fact_nodes"
               :source-tables #{:factsets :fact_paths}
               :subquery? false}))

(def report-logs-query
