It turns out that I have to make a query in which I get returned several duplicate records, except for a field that is counters.
The question in itself is that I need to collect the record with the highest value of counters. Right now the sentence is as follows
SELECT * FROM Bares B inner JOIN Contadores C on B.idProd = C.idLocal where B.EmpresaOperadora='B'
Of those 3 records, I should draw first since it is not repeated and the last one since it is the one with the highest value of countersEntradas. I understand that it must be an easy thing, but I am not very focused on this topic and what I have tried has not been a good result. Greetings