FeaturesFollow related records

Feature 04 / 17

Follow related records

Follow related records from a customer, order or incident and keep the starting identifier and its joins in view, so the next question does not start over.

Related records in the web appAvailable

The problem

When investigating a customer, order, transaction, or incident, how do you follow it across tables today?

An investigation seldom ends with one row. A customer leads to orders, an order to line items and payments, and a failed payment back to an event. Repeating IDs across tabs and rebuilding joins from memory makes it easy to lose the thread.

A clearer workflow

  1. Anchor the investigation

    Begin with the customer, order, transaction, or other identifier you already know.

  2. Trace the relationship

    Inspect the keys between tables and build a focused query that returns the related records together.

  3. Keep asking

    Refine the query as new evidence appears, without losing the original identifier and join path.

Worked example

Follow one customer to their invoices

Starting question

Which invoices belong to CustomerId 1 in Chinook?

Steps to follow

  1. Follow “Try the customer invoice query” to open Chinook Customer Invoices. Customer ID 1 is prefilled; keep it for this example or edit it.
  2. Choose Preview SQL to inspect the Customer.CustomerId = Invoice.CustomerId join and customer filter before running it.
  3. Run the query and inspect the returned invoice identifiers. Use an InvoiceId to prepare the next query against InvoiceLine.InvoiceId.

What you learn

In the pinned demo snapshot, CustomerId 1 returns seven invoices, including InvoiceId 98. You can use those IDs to look up line items next.

Try the customer invoice query

What changes

The relationship becomes part of a repeatable query rather than a sequence of manual lookups.

In the demo story

Sarah follows order 11045 from Orders to Order Details and Products through foreign keys, then to its shipping request in a separate Shipping database.

The guided demo of this story is being built. The worked example above runs in today’s demo project.