{
"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",174,null,null,"rows.sql?m=appointments_operations&period=2026-09&dim=channel&value=Google%20Ads"],["Click a bar to see the rows behind it","Comparison portal",118,null,null,"rows.sql?m=appointments_operations&period=2026-09&dim=channel&value=Comparison%20portal"],["Click a bar to see the rows behind it","Referral",96,null,null,"rows.sql?m=appointments_operations&period=2026-09&dim=channel&value=Referral"],["Click a bar to see the rows behind it","Meta Ads",71,null,null,"rows.sql?m=appointments_operations&period=2026-09&dim=channel&value=Meta%20Ads"]]
}
The SQL behind this page
select channel, count(*)
from leads
where appointment_status in ('scheduled', 'held')
and appointment_at >= '2026-09-01' and appointment_at < '2026-10-01' -- Europe/Zurich
group by channel
order by 2 desc;