Answers for "order by monthly in sql"

SQL
0

order by monthly in sql

SELECT     { fn MONTHNAME(OrderDate) } AS MonthName, YEAR(OrderDate) AS Year, SUM(TotalValue) AS Profits
FROM         [Order]
WHERE     (YEAR(OrderDate) = @year)
GROUP BY { fn MONTHNAME(OrderDate) }, MONTH(OrderDate), YEAR(OrderDate)
order by Year(orderDate),month(OrderDate)
Posted by: Guest on August-07-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language