Calculate the conversion rate from leads to deals in pipelines.
SELECT SUM(CASE WHEN dealPhases.name = ‘Lead’ THEN 1 ELSE 0 END) AS num_leads, SUM(CASE WHEN dealPhases.name = ‘Deal’ THEN 1 ELSE 0 END) AS num_deals, (SUM(CASE WHEN dealPhases.name = ‘Deal’ THEN 1 ELSE 0 END) / SUM(CASE WHEN dealPhases.name = ‘Lead’ THEN 1 ELSE 0 END)) * 100 AS conversion_rate FROM pipelines JOIN deals ON pipelines.id = deals.pipeline_id JOIN dealPhases ON deals.deal_phase_id = dealPhases.id
Connect 300+ sources, serve any BI tool, and give every AI agent one governed endpoint to read, and write back where the app supports it.