in reply to DBI INTERVAL Error

First, you queries are missing the required (but redundant) GROUP BY clause.

INTERVAL is merely a convenience, but it can be expressed otherwise, though it differs by RDBMS. Generally, if trying to remove 6 days, you can say DAYS without the word INTERVAL. For mysql, you might want to check Date and Time Functions.