SELECT
partner_id, click_date, sum(clicks) as clicks
FROM
daily_metric
LEFT JOIN transaction ON daily_metric.partner_id = transaction.partner_id
FORCE INDEX (click_date_index) WHERE click_date BETWEEN :ycp0 AND :ycp1
GROUP BY partner_id , click_date)
I have wrond syntacs :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FORCE INDEX (click_date_index) WHERE click_date BETWEEN '2014-09-01' AND '2014-0' at line 26.
Index is used to where clause, what is wrong with my syntacs ?