Postavio sam slijedeći upit, međutim dobivam potpuno nerealne rezultate. Molim, da li može kakva sugestija.
select T08.Category, SUM(coalesce(T08.Amount, T08.AmtSplit)) as '2008',
SUM(coalesce(T09.Amount, T09.AmtSplit)) as '2009'
from T2008 as T08, T2009 as T09
where T08.Category = T09.Category
group by year(T08.Date), T08.Category
order by year(T08.Date), T08.Category