Calculate the customer churn rate.
SELECT COUNT(DISTINCT customer_id) AS total_customers, COUNT(DISTINCT CASE WHEN last_purchase_date < DATE_SUB(NOW(), INTERVAL 30 DAY) THEN customer_id END) AS churned_customers, (COUNT(DISTINCT CASE WHEN last_purchase_date < DATE_SUB(NOW(), INTERVAL 30 DAY) THEN customer_id END) / COUNT(DISTINCT customer_id)) * 100 AS churn_rate FROM tables
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.