SELECT
DATE_FORMAT( DATE_ADD( CONCAT( #{map.startDate} ), INTERVAL ( help_topic_id ) DAY ), '%Y-%m-%d' ) dt
FROM
mysql.help_topic
WHERE
TIMESTAMPDIFF( DAY, CONCAT( #{map.startDate} ), CONCAT( #{map.endDate} ) ) >= help_topic_id
ORDER BY
DT ASC