I have a table in my database called book_collection, which has columns: publisherID, title, familyID, bookID and another table called book_authors which has columns: bookID and authorID.
I want to join the tables together and then find all the "books" that have same publisherIDs and titles.
So I initially started with:
SELECT book_collection.publisherId, book_collection.title,
book_authors.authorId FROM book_collection INNER JOIN book_authors ON book_collection.bookId = book_authors.bookId
This would join the tables, but the problem I am having now
is how can I perform any other queries to this table.
If I copy this code and paste it after every SELECT * FROM ...
, it gives
me an error saying "every derived table needs an alias"?
I am not the best with SQL, so please go light with me. Any help will be greatly appreciated!