// EXECUTION_PIPELINE
Implementation Pipeline
Our engine handles the complexity of data movement while you focus on high-level decision logic.
PHASE_1 // Month-Over-Month Tracking
See exactly what percentage of users acquired in January came back to purchase in February, March, and beyond.
PHASE_2 // Subscription vs. One-Off
Filter cohorts to compare the lifetime retention of active subscribers against one-time purchasers.
PHASE_3 // Margin Cohorts
Toggle from percentage-based retention to absolute cumulative gross margin to see when a cohort breaks even on CAC.
// STRATEGIC_SCENARIO
Deep Data Retrieval
How Arcli grounds AI in your exact schema to generate highly-optimized, dialect-specific execution logic.
The Engine Room: Cohort Generation
How Arcli identifies the acquisition month and maps all subsequent revenue to that cohort.
THE EXECUTIVE FILTER (ROI)
Provides undeniable proof of your LTV curve, allowing you to confidently scale top-of-funnel ad spend knowing exactly when it will pay back.
- Fully optimized for PostgreSQL / DuckDB constraints.
- Bypasses semantic layer hallucinations via strict schema grounding.
PostgreSQL / DuckDB_COMPILE
-- Generated by Arcli AI Semantic Router
WITH first_orders AS (
SELECT customer_id, DATE_TRUNC('month', MIN(created_at)) AS cohort_month
FROM tenant_workspace.shopify.orders
GROUP BY 1
),
subsequent_orders AS (
SELECT
o.customer_id,
f.cohort_month,
DATE_TRUNC('month', o.created_at) AS order_month,
o.total_price
FROM tenant_workspace.shopify.orders o
JOIN first_orders f ON o.customer_id = f.customer_id
)
SELECT
cohort_month,
DATE_DIFF('month', cohort_month, order_month) AS months_since_acquisition,
COUNT(DISTINCT customer_id) AS active_customers,
SUM(total_price) AS cohort_revenue
FROM subsequent_orders
GROUP BY 1, 2
ORDER BY 1 DESC, 2 ASC;