I have a 500 line SQL query I'm working on so I'll try to use a simpler example....
Assume I have a table Books that has Book_id, Author and Title columns, a table Publisher that has publisher information and a table Translations that contains Book_id, Title and Language columns.
I want to SELECT all books from a certain publisher regardless of whether or not they've been translated into Spanish, but I do want to show a column that contains true if they have a Spanish translation.
So assume that my query is SELECT Author, Title, Spanish FROM Books, Translations WHERE Publisher.Book_id = Books.Book_id AND Translations.Book_id = Books.Book_id AND Publisher_id = 1. How do I get a true in the Spanish column from a table that can contain the same book several times or no times ?