diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index ad1eeffca3..0f407553c4 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -1254,8 +1254,8 @@ This produces: ```sql SELECT books.* FROM books - INNER JOIN reviews ON reviews.book_id = book.id - INNER JOIN customer ON customers.id = reviews.id + INNER JOIN reviews ON reviews.book_id = books.id + INNER JOIN customers ON customers.id = reviews.customer_id ``` Or, in English: "return all books that have a review by a customer."