Fetch columns from two tables that are not directly related

Asked

Viewed 45 times

0

I have 5 tables: cliente, produto, compra, compra_produto and fornecedor.

And the following relationships:

compra (fk_cliente)
compra_produto (fk_compra)
compra_produto (fk_produto)
produto (fk_fornecedor)

I want to show customers and suppliers of their products (purchased). But I can’t assemble the query.

  • What’s the matter ?

  • See if this helps: https://answall.com/questions/72710/inner-join-com-3-tables

  • Thanks VME, solved.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.