Based on your description it doesn't look like you will need to join three tables. Also, although the columns in the first table appear to be self-explanatory, it is not clear to me what the columns in the result set are, or how the data in the first table are used to compute the results. So this may be completely wrong, but the general idea would be this:select datename(month,datetrn), sum(income) as [inc.sum], sum(income+[tax income]) as [tot.period]from YourTablegroup by datename(month,datetrn)