Guest User

Untitled

a guest
Oct 24th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. SELECT authors.name, book.name_book
  2. FROM authors INNER JOIN book_author ON authors.id_author = book_author.id_author INNER JOIN book ON book_author.id_book = book.id_book
  3. WHERE book_author.id_book IN (
  4. SELECT book.id_book
  5. FROM book INNER JOIN book_author ON book.id_book = book_author.id_book INNER JOIN authors ON book_author.id_author = authors.id_author
  6. GROUP BY book_author.id_book
  7. HAVING COUNT(book_author.id_author) > 1
  8. )
  9. ORDER BY book_author.id_book
Add Comment
Please, Sign In to add comment