Ecto.Query.last

You're seeing just the function last, go back to Ecto.Query module for more information.
Link to this function

last(queryable, order_by \\ nil)

View Source

Restricts the query to return the last result ordered by primary key.

The query ordering will be automatically reversed, with ASC columns becoming DESC columns (and vice-versa) and limit is set to 1. If there is no ordering, the query will be automatically ordered decreasingly by primary key.

Examples

Post |> last |> Repo.one
query |> last(:inserted_at) |> Repo.one