title: syntax error at or near $1 and also some exception sql grammar exception
body: <p>I'm getting an error syntax error at or near $1 and also some exception sql grammar exception</p>
  
  <pre><code>"select t1.* from ( select * from employee_additional_attributes  where stwid in :stwIdList )"
              + "as t1 join ( select stwid, max(employee_additional_attribute_id) as employee_additional_attribute_id from employee_additional_attributes"
              + "where stwid in :stwIdList and mis_attribute_id in (:attributeId) and start_time &lt;= date(:date) group by stwid )"
              + "as t2 using ( stwid, employee_additional_attribute_id" )
  </code></pre>