Original query:

SELECT
    customers.id,
    customers.email,
    details.firstname,
    details.lastname
FROM
    customers
LEFT JOIN
    details ON details.customer_id = customers.id
WHERE
    customers.pro_user_id = 585;

Prettified:

SELECT
  "customers"."id",
  "customers"."email",
  "details"."firstname",
  "details"."lastname"
FROM
  "customers"
  LEFT JOIN "details" ON ("details"."customer_id" = "customers"."id")
WHERE
  "customers"."pro_user_id" = 585