Ecto.Query.from/2

Parsed documentation:
View on GitHub
Creates a query.

It can either be a keyword query or a query expression. If it is a
keyword query the first argument should be an `in` expression and
the second argument a keyword query where they keys are expression
types and the values are expressions.

If it is a query expression the first argument is the original query
and the second argument the expression.

## Keywords examples

    from(City, select: c)

## Expressions examples

    City |> select([c], c)

## Examples

    def paginate(query, page, size) do
      from query,
        limit: ^size,
        offset: ^((page-1) * size)
    end

The example above does not use `in` because none of `limit` and `offset`
requires such. However, extending a query with where expression would
require so:

    def published(query) do
      from p in query, where: p.published_at != nil
    end

Notice we have created a `p` variable to represent each item in the query.
In case the given query has more than one `from` expression, each of them
must be given in the order they were bound:

    def published_multi(query) do
      from [p,o] in query,
      where: p.published_at != nil and o.published_at != nil
    end

Note the variables `p` and `o` must be named as you find more convenient
as they have no importance in the query sent to the database.
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.