   (let [terms  (map compile-query->sql terms)
         params (mapcat rest terms)
         query  (->> (map first terms)
-                    (string/join " UNION ")
+                   (string/join " UNION ALL ")
                     (format "(%s)"))]
     (apply vector query params)))
 

  (let [terms  (map compile-query->sql terms)
        params (mapcat rest terms)
        query  (->> (map first terms)
                    (alias-subqueries)
                    (string/join " NATURAL JOIN ")
                   (str "SELECT catalog,resource FROM ")
                    (format "(%s)"))]
    (apply vector query params)))


    (throw (IllegalArgumentException. (str op " requires at least one term"))))
  (let [[subquery & params] (compile-query->sql (cons "or" terms))
        query               (->> subquery
                 (format "SELECT catalog_resources.catalog,catalog_resources.resource FROM catalog_resources EXCEPT %s")
                 (format "(%s)"))]
    (apply vector query params)))
