> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcemedium.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Cohort LTO analysis

> How to analyze lifetime orders (LTO) by cohort using SourceMedium tables and common filters

Use this guide to analyze **lifetime orders (LTO)** by cohort (typically first order month) and understand which acquisition cohorts generate the most repeat purchasing.

Questions customers ask most often are listed in [Top analytical questions](https://docs.sourcemedium.com/docs/onboarding/getting-started/thinking-analytically/common-analytical-questions.md). Copy-paste queries are in the [SQL query library](https://docs.sourcemedium.com/docs/data-activation/template-resources/sql-query-library.md).

## Recommended tables

* Orders: [`obt_orders`](https://docs.sourcemedium.com/docs/data-activation/data-tables/sm_transformed_v2/obt_orders)
* Customers: [`obt_customers`](https://docs.sourcemedium.com/docs/data-activation/data-tables/sm_transformed_v2/obt_customers)
* (Optional) Order lines: [`obt_order_lines`](https://docs.sourcemedium.com/docs/data-activation/data-tables/sm_transformed_v2/obt_order_lines)

## Define the cohort

Most commonly:

1. Cohort grain: first order **month**
2. Cohort key: customer’s **first valid purchase date** (using SourceMedium-valid orders)

Tip: Keep cohort logic consistent with any LTV reporting you already use.

## Build the analysis (high level)

1. Filter to SourceMedium-valid orders (`is_order_sm_valid = TRUE`).
2. Determine each customer’s cohort (first valid order date).
3. For each cohort, compute:
   * Total orders
   * Distinct customers
   * Average lifetime orders = `total orders / distinct customers`
4. Add breakdowns (channel, product category, geography) only after the cohort math looks right.

## Common pitfalls

* Mixing invalid/test/refunded orders with valid orders (always start with `is_order_sm_valid = TRUE`).
* Comparing cohorts with different “age” (newer cohorts haven’t had time to accumulate repeat purchases).
* Blending channels (e.g., Amazon + Online DTC) when the question is channel-specific.

## Next steps

* Pair this with retention-focused analysis: [Customer retention](https://docs.sourcemedium.com/docs/help-center/common-analyses/customer-retention.md)
* If you’re reconciling to Shopify: start with [Why don’t Executive Summary & Shopify match?](https://docs.sourcemedium.com/docs/help-center/faq/data-faqs/why-dont-the-executive-summary-and-shopifys-sales-report-match.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.