What is Nostr?
Ben Zanin /
npub12c2…tlg9
2024-05-14 02:30:13

Ben Zanin on Nostr: Is there an idiomatic SQL (sqlite3) way of mapping a subset of selected records from ...

Is there an idiomatic SQL (sqlite3) way of mapping a subset of selected records from a large table ("users") to unique values in a smaller table ("coupons")? It's easy enough to _select_ all the user records not yet mapped, and to select all as-yet unmapped coupons, but then what's a nice clean way of mapping one to the other? Order doesn't matter, only that the mapping once established can be queried again in the future.

My brain is stuck thinking sequentially about this, frustratingly.
Author Public Key
npub12c2un6cf5j7e75mzxv5cjnyyuc8sek2asyd0h0v8j83fxzke60lqcdtlg9