Analytics tutorials

This collection is a tour of analytics techniques, each taught through a small domain problem and a dataset you can check by eye.

You do not need to read every page in order. The domains are different on purpose: inventory teaches event-sourced state, marketing teaches attribution, healthcare teaches interval logic, and graphs teach recursion. Choose the question that resembles your work.

If FeatureQL itself is new, begin with the FeatureQL homepage companion , then complete E-commerce . E-commerce introduces the entity, mapping, binding, and relationship model used by the other tutorials.

Choose by the question you need to answer

TutorialBusiness questionMain technique
E-commerce How do customers, orders, and items relate?Typed relationships, cross-entity aggregation, and array enrichment
SaaS metrics What was MRR on a given date, and which customers need attention?Point-in-time measures and reusable scoring features
Supply inventory How much stock did each warehouse hold on a chosen date?Event-sourced state and semi-additive inventory
Financial consolidation How do entity-specific rules and eliminations change a rollup?Rule-driven measures and non-additive consolidation
Marketing attribution Which touchpoints should receive revenue credit?First, last, linear, time-decay, and weighted allocation
Healthcare episodes Which encounters belong to one stay, and was the patient readmitted?Interval merging, lead windows, and corrected time series
Product analytics Are users activating, returning, converting, or getting stuck?Cohorts, retention, funnels, and behavioral windows
Temporal & experiments What was true then, what is true now, and what did we know at the time?SCD2 lookup, bi-temporal cutoffs, and experiment uncertainty
Graphs & referrals How deep is a referral tree, and what belongs to each connected group?Recursion, subtree rollups, and connected components
OBT modeling How do I analyze several nested arrays without multiplying rows?Array-scoped aggregation, argmax, and re-nested profiles

See how the techniques fit together

The tutorials approach analytics from several directions:

  • Relationships and grain: E-commerce establishes how the output entity differs from the child data being aggregated. SaaS, Finance, Healthcare, Product, and Graph build on that foundation.
  • State over time: SaaS asks whether a subscription was active on a date. Supply rebuilds stock from events. Temporal separates valid time from the date when information became known.
  • Sequences and windows: Marketing follows touchpoints before a conversion. Healthcare merges overlapping encounters. Product measures onboarding, retention, funnels, and bursts of clicks.
  • Allocation and rollup: Finance applies different rules before consolidating. Marketing divides one conversion's revenue among several touches.
  • Nested data: OBT keeps contacts, opportunities, and activities on one account row. Marketing, Healthcare, and Product also use array-scoped transforms without changing the outer grain.
  • Recursive structure: Graph walks parent links and arbitrary edges when a fixed number of joins is not enough.

This variety is intentional. The goal is not to repeat one star-schema recipe with different nouns; it is to show how FeatureQL expresses recognizably different analytical jobs.

A comfortable learning route

After E-commerce, choose one page from each group:

  1. A snapshot: SaaS or Supply .
  2. A sequence: Product , Marketing , or Healthcare .
  3. A structural problem: Finance , Temporal , Graphs , or OBT .

That route gives you breadth without requiring all ten tutorials.

What to expect on each page

Every tutorial follows the same working rhythm even though the analytical technique changes:

  1. Inspect a tiny, controlled dataset.
  2. Declare entities and map physical columns to features.
  3. Persist only the building blocks reused by later questions.
  4. Bind the output population and run one focused analysis at a time.
  5. Compare the result with the explanation directly below it.

In generated notebooks, run Data and Model before the analytical cells. If the kernel restarts or a query reports missing tables or features, rerun those setup sections before continuing.

Once you are comfortable in batch analytics, see how the same feature model can support production decisions in Real-time segmentation and Federated serving .