SELECT DISTINCT
era.id
FROM
evaluation_reports era
INNER JOIN evaluations e ON era.evaluations_id = e.id
WHERE
e.id IN (115399)
AND DATE(era.eval_date) >= DATE({{date.start}})
AND DATE(era.eval_date) <= DATE({{date.end}})
I am trying to add the date filter to my query but it doesn't work on field filter. Whenever Im using era.eval_date it is showing Unknown column 'evaluation_reports.eval_date' in 'field list'.
It works fine with the date variable type. Also the eval_date is a date type variable. This is how it is stored: 25/01/01