Good morning: I have two tables in which the one by means of the reference, and it makes the query well, but I want to put the other fields of my table entsal and that are equal to the reference, for example add names , tea de la table entsal.
Example of my query:
select * from (SELECT DISTINCT referencia from salidas) entsal INNER JOIN (SELECT referencia FROM salidas) salidas ON entsal.referencia= salidas.referencia
table entsal fields = nameS (char), reference (char), tea (numeric)
table outputs fields = vin (char), status (char), reference (char)
I want you not to repeat the references and also bring me the corresponding information to my table of entsal with your reference that you have. Can someone help me with my doubt, please.