The `.select` query method accepts multiple arguments. When one of those arguments is a Hash, the key would be understood as the name of a table and each of its values as fields of said table.

Example:

User.joins(:posts).select(:name, posts: [:id, :title, :body])
=> SELECT name, posts.id, posts.title, posts.body FROM "users" INNER JOIN "posts" ON "posts"."user_id" = "users"."id"