select variable time interval (no replies)
(MySQL.com) within a case statement I have the following:
('all sessions 2'.producer_on >= DATE_SUB(CURRENT_DATE, INTERVAL 7 DAY))
which gives me the activity I want for the past 7 days.
What I want to do is to replace the 7 with a variable from a table