raghuldrag (12/31/2013)
i need the output likefor example 2013-04-01 is in table my expectation output is 04-2013 (extract month with year)......
Hi.
This seems to be a relatively simple single SELECT statement.
Please use DATEPART to convert billed_date into a year with yyyy, and a second datepart to get the month with mm.
Then group your query the way you need to summarize the data, using SUM to add up values.
Thanks
John.