Stripe provides https://stripe.com/sigma which allows users to write their own SQL.
If you had a multi-tenant Postgres DB, how would you build a system such as Stripe Sigma? Where each tenant can only query their own data obviously.
Thanks for any recommendations!
More notes that could be helpful:
* dozens of tables
* data latency should be minimized, but 5 minutes is fine.
* not "big data", <10 GB per tenant
* need a post-processing step (for example, add a column of current balance to each transaction in an accounting system)