Fork me on GitHub
#honeysql
<
2021-03-17
>
dcj00:03:12

Interesting, I finally tried to run the entire query with that last bit, and now I get this:

ERROR: subquery in FROM must have an alias
  Hint: For example, FROM (SELECT ...) [AS] foo.
  Position: 1092

dcj00:03:28

So I need to figure out how to generate that alias for the select....

seancorfield00:03:05

I told you how to do that just above.

seancorfield00:03:41

^ @dcj did you not see my suggestion?

dcj00:03:22

yes, wrapping the entire thing in an outer select :*

seancorfield00:03:01

No, the alias in the from clause.

dcj00:03:14

trying that now,

seancorfield00:03:43

(from [ (some subquery) :alias ]) => FROM (some subquery) AS alias

seancorfield00:03:12

So it’s just a matter of how much of your query needs to go into that (some subquery) piece.

dcj00:03:21

Seem to recall issue with subsequent inner joins not being inside the enveloping FROM