Machines05 / 07
SQL library
Shared queries any Product Advocate runs with parameters. Pricing and usage questions get answered in minutes.
- Status
- Running
- Since
- In use since September 2026
- Built with
- SQL · Redash
01
The miss
Every pricing or usage question turned into a data request, and then we waited.
Corrected SQL library K.A.
02
The machine
A library of shared, parameterised SQL queries on Snowflake, run through Redash. Ten of them. Any Product Advocate picks a query, sets the parameters and reads the answer.
03
How it runs
- How SQL library runs, step by step:
- Question to Pick
- Pick to Parameters
- Parameters to Run
- Run to Answer
04
Under the hood
- Ten shared, parameterised queries.
- Any Product Advocate runs them: pick one, set the parameters, read the answer.
- In use since September 30.
-- usage for one account over a date rangeselect plan, sum(usage_units) as usage, count(distinct day) as active_daysfrom usage_dailywhere account = '{{ account }}' and day between '{{ from }}' and '{{ to }}'group by planorder by usage desc;One query of the ten, written for this page. The {{ }} fields are Redash parameters; names are made up.
05
What changed
- Pricing and usage questions take minutes.
06
What I can show
Company data sits behind it, so this page describes it.