{
"type": "bar",
"time": null,
"labels": true,
"marker": null,
"xtitle": null,
"ytitle": null,
"ztitle": null,
"xticks": null,
"yticks": null,
"ystep": null,
"xmin": null,
"ymin": null,
"xmax": null,
"ymax": null,
"toolbar": null,
"show_legend": false,
"logarithmic": null,
"horizontal": true,
"stacked": null,
"height": 360,
"colors": [],
"points": [["Click a bar to see the rows behind it","Google Ads",15945,null,null,"rows.sql?m=revenue_finance&period=2026-09&dim=channel&value=Google%20Ads"],["Click a bar to see the rows behind it","Comparison portal",11350,null,null,"rows.sql?m=revenue_finance&period=2026-09&dim=channel&value=Comparison%20portal"],["Click a bar to see the rows behind it","Meta Ads",10080,null,null,"rows.sql?m=revenue_finance&period=2026-09&dim=channel&value=Meta%20Ads"],["Click a bar to see the rows behind it","Referral",7820,null,null,"rows.sql?m=revenue_finance&period=2026-09&dim=channel&value=Referral"]]
}
The SQL behind this page
select channel, sum(invoice_amount_chf)
from leads
where invoiced_at >= '2026-09-01' and invoiced_at < '2026-10-01' -- Europe/Zurich
group by channel
order by 2 desc;