code date x y 24 2010/2/14 2 3 26 2010/5/24 1 1 314 2010/6/14 3 1 30 2012/1/25 1 3 29 2012/3/11 2 1 28 2014/6/1 4 5 18 2014/7/20 8 1 i want this result codecount date x y 2 2014 12 6 2 2012 3 4 3 2010 6 5
SELECT Count(1) As codecount, Year(date) As date, Sum(x) As x, Sum(y) As y FROM YourTable GROUP BY Year(date) ORDER BY date DESC ;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)