You want something like this.I am using calendar months as you didn't state whether it was months from a certain date of the month.I also haven't tested it.select clientname, invoiceid, sum(case when invoicedate >= DATEADD(mm,DATEDIFF(mm,0,getdate()),0) and <= dateadd(ms,-3,DATEADD(mm,DATEDIFF(m,0,getdate())+1, 0)) then cinvoiceamount - paidamount else 0 end) as [Current], sum(case when invoicedate >= DATEADD(mm,DATEDIFF(mm,0,dateadd(mm,-1,getdate())),0) and <= dateadd(ms,-3,DATEADD(mm,DATEDIFF(mm,0,getdate()), 0)) then cinvoiceamount - paidamount else 0 end) as Period1, sum(case when invoicedate >= DATEADD(mm,DATEDIFF(mm,0,dateadd(mm,-2,getdate())),0) and <= dateadd(ms,-3,DATEADD(mm,DATEDIFF(mm,0,dateadd(mm,-1,getdate())), 0)) then cinvoiceamount - paidamount else 0 end) as Period2, sum(case when invoicedate < DATEADD(mm,DATEDIFF(mm,0,dateadd(mm,-2,getdate())),0) then cinvoiceamount - paidamount else 0 end) as Period3from invoice iinner join clients c on i.clientid = c.clientidgroup by clientname, invoiceid