good day guys my doubt is this I put the syntax with its respective order by desc to show me the gain from highest to lowest but I keep ordering them randomly: (
SELECT month(s.fInicio)AS [MES],a.Nombre_auto,
SUM(DATEDIFF(d, dateadd(d, -1, s.fInicio), s.fTermino) * a.Tarifa_Diaria) [GANANCIA]
FROM dbo.Arriendo_Solicitud s
INNER JOIN dbo.Arriendo_Autos a ON a.Patente = s.Patente
GROUP BY month(s.fInicio),a.Nombre_Auto ,a.Tarifa_Diaria
ORDER BY month(s.fInicio),a.Tarifa_Diaria DESC