Is there a way to alias a subquery?
(SELECT MAX(product_id)
FROM products p2
WHERE p1.product_id = p2.product_id) subquery2
the subquery above has been aliased to subquery2
@dcj What is that context for how that is used?
user=> (-> (select :*) (from [(-> (select :*) (from :foo)) :a]) (h/format))
["SELECT * FROM (SELECT * FROM foo) a"]
user=>
An aliased thing is just a pair with the thing in the first slot and the alias in the second slot.