Hello, I don’t know the structure of your tables, so I’ll try to help you...
select livros.titulo,
autor.pais
From livros inner join livro_autor
On livros.objectid = livro_autor.objectidlivro
Inner join autor
On autor.objectid = livro_autor.objectidautor
where autor.pais = 'Brasil'
livros.titulo
should be replaced by the name of the column where the title information is in its table books. (Livros.nome_da_coluna
)
autor.pais
should be replaced by the name of the column where the country information is in the author table. (Autor.nome_da_coluna
)
In the Internet, where is objectid
you must replace by the name of the column where are the information that relates in your tables, initially in the table books, then in the livro_autor
which relates to books. Then the column of the author table which relates to the table livro_autor
.
I hope I’ve helped you, in case you got a little confused, enter the names of these columns that I assemble the correct script again.
Let me know if it works.
Hello, William. Welcome! When the question you intend to answer does not have enough details to give a satisfactory answer, it is preferable to expect clarification from the author. You can comment to ask for it yourself as soon as you gain a little more reputation. Also, use the formatting tools to separate text code, so that it is easier to distinguish. You can get a sense of how the answer is getting by looking at the preview just below the edit box.
– Pablo Almeida