One reusable SQL query that replaced days of engineering turnaround
- Outcome
- 24–48h → ~10-min self-served reports
- Scope
- Enterprise reporting, 5–10/week
- Tools
- PostgreSQL
- Metabase
- Intercom
Problem
Enterprise merchants with analytical needs regularly asked for data the default UI couldn’t hand them in usable form — for example, a per-affiliate list of referred customers with Stripe customer IDs, conversion data, and emails. The UI could export it, but only as an everything-included dump the merchant then had to clean up themselves.
Finding
A standardized, reusable query — not a bespoke one per request — could serve the whole class of “custom data the UI won’t shape for you” asks.
Resolution
I wrote reusable PostgreSQL queries (run through Metabase) that return the requested data pre-shaped, delivered to the merchant as a clean CSV via the helpdesk or email.
Impact
The same request routed to Engineering took 24–48 hours; self-served through Metabase it takes about 10 minutes, with complex requests handled within the day. These come in 5–10 times a week from enterprise customers.