hi
i have following query to show the monthly sales after summing up monthly sales total but i have facing a problem this query is not properly perform order by clause according to the months like jan,feb,mar etc... please tell me where i made mistake
SELECT CashName AS AccountName, LEFT(DATENAME(month, CashDate), 3) + ' - ' + DATENAME(year, CashDate) AS Months, SUM(Total) AS NetSalesFROM dbo.CashSales
GROUP BY LEFT(DATENAME(month, CashDate), 3) + ' - ' + DATENAME(year, CashDate), CashName