Ask HN: I want to build my own query language
3 points| bewal416 | 3 months ago
One customer needs full first names but only the first letter of the last name. Another needs a very specific JOIN with an entity almost no other customer cares about. To accommodate, I’ve been building custom Looker reports for each customer, which won't scale well.
I started looking into how other SaaS companies solved this. Many built their own SQL-like query languages:
- Salesforce -> SOQL - Shopify -> ShopifyQL - Stripe -> Sigma
All of them seemed to address the same problem I’m seeing: customers have unique reporting needs that no-code GUIs can’t handle. A drag and drop builder is great for non-techies, but most real requests require joins and transformations, and I’m trying to avoid becoming a consulting shop for every customer.
I'm particularly impressed by Stripe Sigma because of how they combine SQL with an LLM layer. Users can ask for a report in plain English, customize it in a lightweight BI tool, and edit the query only whenever needed.
Has anyone gone through this or have advice on alternative approaches? I’m open to any direction here.
doctorzook|3 months ago
PaulHoule|3 months ago
benoau|3 months ago
If everyone lives within one database I'd throw up a per-customer read-only database in front of it for running their queries so they don't create performance issues.
bewal416|3 months ago