I m having an issue of sorting my table queries by month and year and group by part.
Actually the column field is varchar type like 13-Jun-2011
Now i want to sort the result by months and year...
so that i get total count by months or month n year or only by year...
Jun 2011 - 40
Jul 2011 -65
2011 - 90
2012 - 100
my current query is somewhat like this
select refid,posted_on,count(*) as total from listing where refid='BS2121'