# `Ecto.SubQuery`
[🔗](https://github.com/elixir-ecto/ecto/blob/v3.13.6/lib/ecto/query.ex#L1)

A struct representing subqueries.

Users of Ecto must consider this struct as opaque
and not access its fields. Authors of adapters may
read its contents, but never modify them.

See `Ecto.Query.subquery/2` for more information.

# `t`

```elixir
@type t() :: %Ecto.SubQuery{
  cache: term(),
  params: term(),
  query: term(),
  select: term()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
