Revenue query — SQL (Postgres)
A parameterized revenue query against Postgres (works for MySQL too — one dialect switch). Pre-wired for the docker one-liner in this description; point it at your warehouse to go live.
What’s inside
3 nodes — every type links to its full reference page.
| Step | Node | Type |
|---|---|---|
| Report month | Inject | input.inject |
| Monthly revenue | SQL Query | storage.sql |
| Finance board | Console | utility.console |
Import it
- Studio → Import — paste the JSON below (or the URL
/docs/templates/revenue-query-sql-postgres.json). - Or ask the AI Copilot with the JSON pasted after the phrase:
import this workflow json into a new workflow named "Revenue query — SQL (Postgres)" - Any credentials the nodes need are
${credential.…}references — add them once in Admin → Credentials and the template picks them up. Nothing secret ships in a template.
The workflow document (flowdrome.workflow.v1, 3 node types)
{
"schemaVersion": "flowdrome.workflow.v1",
"id": "",
"name": "Revenue query — SQL (Postgres)",
"version": "0",
"status": "draft",
"nodes": [
{
"id": "seed",
"type": "input.inject",
"label": "Report month",
"category": "trigger",
"config": {
"contentType": "application/json",
"payload": {
"params": [
"2026-07"
]
}
},
"position": {
"x": 0,
"y": 0
}
},
{
"id": "q",
"type": "storage.sql",
"label": "Monthly revenue",
"category": "io",
"config": {
"credentialId": "",
"dialect": "postgres",
"host": "127.0.0.1",
"port": 5433,
"database": "flowdromedemo",
"user": "postgres",
"password": "flowdromedemo",
"tls": "disable",
"query": "SELECT 3 AS orders, 1387.25 AS revenue, $1::text AS month",
"params": [],
"paramsField": "params",
"rowLimit": 100,
"timeoutMs": 15000
},
"position": {
"x": 530,
"y": 0
}
},
{
"id": "out",
"type": "utility.console",
"label": "Finance board",
"category": "utility",
"config": {
"message": "revenue: {{ $json.rows }}"
},
"position": {
"x": 1060,
"y": 0
}
}
],
"edges": [
{
"id": "e0",
"sourceNodeId": "seed",
"sourcePort": "output",
"targetNodeId": "q",
"targetPort": "input"
},
{
"id": "e1",
"sourceNodeId": "q",
"sourcePort": "output",
"targetNodeId": "out",
"targetPort": "input"
}
],
"triggers": [
{
"id": "t0",
"nodeId": "seed"
}
],
"meta": {
"snippets": [],
"source": "template-gallery",
"description": "A parameterized revenue query against Postgres (works for MySQL too — one dialect switch). Pre-wired for the docker one-liner in this description; point it at your warehouse to go live."
}
} Generated from the verified demo corpus — this exact document seeds and runs on a fresh Flowdrome. Raw JSON: revenue-query-sql-postgres.json.