distinct(columns, order_by)
public

SELECT DISTINCT clause for a given set of columns and a given ORDER BY clause.

distinct("posts.id", ["posts.created_at desc"])