Posts by Luis • 36 points
1 post
-
2
votes2
answers18011
viewsA: INNER JOIN with two fields of the same table
You need to do 2 joins, one for source and one for destination. SELECT un_src.nome_unidade as origem, un_dst.nome_unidade as destino, FROM pedidos INNER JOIN unidades as un_src ON un_src.cod_unidade…