News for hackers. Stuff that matters.
Re:PRQL – A proposal for a better SQL by magicalhippo on Monday January 24, 2022 @03:34PM (#30063620)
> With a CTE

The DB we use supports those, I just learned about them too late so keep forgetting they exist :(

> It would really help in SQL if you could refer to column aliases so you don't have to repeat the expression.

The DB we use supports that, so in your CTE you could write

   AND   gross_cost > 0
We do that all the time, which will be a pain now that we're migrating to a different DB server which doesn't.

There are no comments on this comment yet.