CTE==Common Table Expression. It's not specific to any particular language. It's basically like a view, except you can define them the same place as you use them, and they can be recursive.
Re:Ask HN: How do you test SQL?
by jimmygrapes on Tuesday January 31, 2023 @07:40PM
(#34604605)
Thank you for the clarification, that actually makes sense in context!
... Although also now I'm a little. put off because you reminded me of working with DOS-based SAP interfaces and Oracle's Java-based attempts to make "interactive views" circa 2006 :/
Re:Ask HN: How do you test SQL?
by osigurdson on Tuesday January 31, 2023 @08:33PM
(#34605119)
>> I could think of when you said CTE was "chronic traumatic encephalopathy"
The title is "Ask HN: How do you test SQL"
Sometimes using databases feels just like repeatedly slamming your head into your desk, so that fits.
I used to think that, but once you start thing about them in the right way, the relational model is pretty nice.
Agreed, but it doesn’t solve every problem. And then there are the purely operational issues; for example a few days ago autovacuum was never able to completely finish vacuuming one particular table, but then the problem mysteriously went away and now it’s fine. Wonderful.
Not much more to say, just observing, sorry if this is irrelevant commentary.