Skip to content

Instantly share code, notes, and snippets.

@zmsmith
Created August 20, 2010 14:40
Show Gist options
  • Save zmsmith/540455 to your computer and use it in GitHub Desktop.
Save zmsmith/540455 to your computer and use it in GitHub Desktop.
SELECT `author`.`id`, `author`.`first_name`, `author`.`last_name`
FROM `author`
INNER JOIN `author_books`
ON (`author`.`id` = `author_books`.`author_id`)
WHERE `author_books`.`book_id`
IN (SELECT U0.`id`
FROM `book` U0
INNER JOIN `bookstore_books` U1
ON (U0.`id` = U1.`book_id`)
WHERE U1.`bookstore_id` = 1 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment