Giving more details about the input table will help us help you. But your current description is very vague: > I am after a query that would get the sum(column value) from a table that records intervals based on subset (interval) of a number between 1 to 48 > i.e select aDate, sum(column) as v, sum(v / 2) as c where interval between 15 and 22 order by aDate; ... and that explains also why you're probably not finding any answer: vague human words are not the best way to state your problem and translate it into SQL.