here's a cool problem someone asked about, I tried to be lazy and have Claude do it but Claude couldn't figure it out, except it was nice enough to show me the LAG and LEAD window functions.

Select a bunch of objects, and each has a link to its "previous" and "next" entry in order of table insertion.

github.com/sqlalchemy/sqlalche

0

If you have a fediverse account, you can quote this note from your own instance. Search https://hachyderm.io/users/zzzeek/statuses/115698061054289356 on your instance and quote it. (Note that quoting is not supported in Mastodon.)