Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- authors.au_fname AS FirstName, authors.au_lname AS LastName,
- COUNT(DISTINCT publishers.pub_id) AS Publishers
- FROM authors
- INNER JOIN titleauthor
- ON dbo.authors.au_id = titleauthor.au_id
- INNER JOIN titles
- ON titleauthor.title_id = titles.title_id
- INNER JOIN publishers
- ON titles.pub_id = publishers.pub_id
- GROUP BY authors.au_fname, authors.au_lname
- HAVING COUNT(DISTINCT publishers.pub_id) = 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement