I have a table with Amounts, and Created Dates. I want to create a query that loops - AND changes the date within the query. Otherwise I have to do it manually.

Current query:

```
<cfquery name=qWeekly datasource="#DSN#">
    SELECT  SUM(Amount)
    FROM    Transactions
    WHERE ( CreatedDate BETWEEN '1-19-2014' AND '1-25-2014' ) 
    AND   ( Amount > 0 )
</cfquery>

```

I would manually change the filter to `... (CreatedDate BETWEEN '1-19-22014' AND '1-25-2014')...`, then manually change it again to: `(CreatedDate ...BETWEEN '1-26-2014' AND '2-8-2014')`.

What I want to do is something like `Between 'X' AND 'X+7'`, so that I get one weeks worth of data, incremented by 7 days, so I can generate an output by weekly date ranges. In psuedo code, something like this:

```
<cfif CreatedDate < Now()>
    <cfloop index="x" step="7">
        <cfquery name=qWeekly datasource="#DSN#">
            SELECT  SUM(Amount)
            FROM    Transactions
            WHERE ( CreatedDate BETWEEN 'x' AND 'x+7' ) 
            AND   ( Amount > 0 )
        </cfquery>
    </cfloop>
</cfif>

```

Is this possible?