SQLite Forum

Abbreviation
Login

Abbreviation

(1) By anonymous on 2021-07-30 17:57:06 [link]

I have two idea of suggestion of abbreviation with SQLite:

* `DEFERRED` to be short for `DEFERRABLE INITIALLY DEFERRED`

* `ALL ROWS` to be short for `ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING`

(2) By Ryan Smith (cuz) on 2021-07-30 20:57:52 in reply to 1

I can kinda roll with your first suggestion, but for your second, though it makes sense when considering simply the text you posted, thinking of "what even is a window statement", your all rows, or the origin ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING, is essentially the antithesis of what a window statement tries to achieve, that all-inclusive of a window is principally just a full JOIN.

So while your text is shorter, there is nearly never a reason to use it if your intent is to use window queries.

I'm very willing to be corrected though, even eager to see a reasonable example or use-case. If you can show me a query with a window statement like that which produces useful results that cannot be produced by a normal query, perhaps with a sub-query or JOIN, then I would certainly concede you have a point.