Obtain Distinct top 1 columns in SQL Server
<p>I am writing a stored procedure for a project in SQL Server 2014 and I have this code:</p>

<pre><code>ALTER PROCEDURE FOF_MejorVendedor
AS
BEGIN
    SELECT TOP 1 
        F.Nombre, Em.Nombre, (P.Precio * CA.Cantidad)  as 'Ganancia' 
    FROM
        dbo.FO_Carrito CA
    JOIN 
        dbo.FO_Solicitud S on S.ID = CA.FK_SolicitudC
    JOIN 
        dbo.FO_Recibo R ON R.FK_Solicitud = S.ID
    JOIN 
        dbo.FO_Productos P ON P.ID = CA.FK_ProductosC 
    JOIN 
        dbo.FO_Cliente C ON C.ID = S.FK_Cliente
    JOIN 
        dbo.FO_Estante E ON E.FK_Producto = P.ID
    JOIN 
        dbo.FO_PasilloXDepartamento PD ON PD.FK_Estante = E.NumeroEstante
    JOIN 
        dbo.FO_Encargado En ON En.ID = PD.FK_Encargado
    JOIN 
        dbo.FO_Empleado Em ON Em.ID = En.FK_EmpleadoE 
    JOIN
        dbo.FO_Departamento D ON D.ID = PD.FK_Departamento
    JOIN 
        dbo.FO_Ferreteria F ON D.FK_Ferreteria = F.ID
    JOIN 
        dbo.FO_EmpleadosXFerreteria EF ON EF.FK_Ferreterias = F.ID 
    GROUP BY
        F.Nombre, Em.Nombre, (P.Precio * CA.Cantidad)
    ORDER BY 
        Ganancia DESC
END
</code></pre>

<p>But I am only getting the Top 1 of 'Ganancia' but I want to get it for each distinct value in the column "F.Nombre". How can I modify the query?</p>