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

# Linked records

> Show, group by and filter on fields of a related record, like the customer behind an order.

Most datasets reach other records: a sale has its order, the order has its customer, the customer may have a company. Write a related record's field with a dot after the record's name, and group by it, filter on it or sort by it like any dimension.

```sql theme={null}
FROM sales
  SHOW net_sales
  GROUP BY order.customer.country
```

Records chain, so `order.customer.company.name` is the company of the customer who placed the order.

```sql theme={null}
FROM sales
  SHOW net_sales, orders
  WHERE order.customer.tags CONTAINS 'wholesale'
  GROUP BY product.vendor
```

Record names are singular: `order`, `customer`, `product`. Each dataset's page lists the records it reaches under **Linked records**, and each [record's page](https://docs.queryful.app/queryfulql/records/overview.md) lists its fields.


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