Walk a tree with a recursive CTE
Query an employee/manager or category hierarchy to any depth using WITH RECURSIVE.
Loading snippets…
137 snippets
Query an employee/manager or category hierarchy to any depth using WITH RECURSIVE.
Stream CSV rows as associative arrays using fgetcsv, without loading the whole file into memory.
Stream CSV rows as dicts keyed by header with csv.DictReader, handling UTF-8 BOMs and quoted commas.
Understand how the three ranking window functions treat ties, with one query that shows all three.
Create UUIDs, random integers in a range and URL-safe tokens with the Web Crypto API instead of Math.random.
Process a large list with at most N promises in flight at once, preserving result order.
Return consistent, machine-readable API errors using the application/problem+json format.
Turn row values into columns (for example monthly totals) using conditional aggregates, without crosstab.
Build a new object with only some keys, or without some keys, without mutating the original.
Show each row's share of the grand total or of its group without a self-join.
Convert between query strings and objects with URLSearchParams, including repeated keys.
Extract next, prev, first and last page URLs from an RFC 8288 Link header like GitHub's API returns.