Co třeba:
select datepart(yyyy, [date]) as [year]
from shoptransfer
group by datepart(yyyy, [date])
Nebo:
select count(*) as qty, datepart(yyyy, [date]) as [year]
from shoptransfer
group by datepart(yyyy, [date])
order by [year]
Toto je založeno na příkazu OP:„Chci seskupit podle roku část data (varchar) sloupce“