This is my query.
select CONVERT(varchar, cast(date as datetime), 3) from shoptransfer group by year (date)
I want to group by the year pa
group by substring(CONVERT(varchar,comuln1,101),1,4)
year 2004 2005 2006