Compose a query to get a complete record against max

ecto

#1

In the Ecto.Query.API. We use max in a select to fetch the max value in that field.

from q in jobs,
 select: max(q.cost)

My question is how can we compose a query that it will return a complete record against the max value instead of just max field value.