This query brings me the information correctly with the difference that it brings me the duplicates, so what I want to do is another column where you tell me how many times the same number is repeated in this case the repeated ones are here (E.N_PARTE) example of what it returns
E.N_PARTE
AAA
AAA
BBB
CCC
BBB
What I want is to add another column where
Repetidos E.N_PARTE
2 AAA
2 BBB
1 CCC
SELECT E.NOM_ALMACENISTA, E.N_PARTE, E.DESCRIPCION, E.INV_MINIMO,
E.INV_MAXIMO, E.INV_EXISTE, E.COS_UNIDLLS,HT.FCH_REGISTRO
FROM ELENTRADAS AS E LEFT OUTER JOIN
HISTORIAL AS HT ON HT.NUM_PART = E.N_PARTE
WHERE (HT.FCH_REGISTRO BETWEEN '2018-08-24' AND '2018-08-24') AND (E.DEPART
= 'Departamento1' )
order by HT.FCH_REGISTRO ASC
Thanks for your help.