Skip to navigation
Get mssql month and year with a sum group by
01.12.14
SELECT l.ids, SUM(qty) AS total FROM products WHERE sold_date > concat(year(getdate())-1,month(getdate()),'00') GROUP BY ids
http://msdn.microsoft.com/en-us/library/ms186313.aspx
Reply
Anonymous
Information Epoch 1736602864
Data dominates.
Home
Notebook
Contact us