How We Replaced 12 Database Queries With One Thanks to a Lateral Join

13 queries become 1, 220ms becomes 12ms. The PostgreSQL feature most PHP devs have never used, with verified benchmarks.