How to use MySQL aggregate functions in queries

With version 2 of dreamfactory, i’m unable to use aggregate functions as before in the filter or fields param.

Suppose example how can i query the following using api

SELECT HOUR(col2), MAX(col1)-MIN(col1)
FROM table_name
WHERE col3=CURDATE()
GROUP BY col3
I’m getting the following errors:

1)DateTime::__construct(): Failed to parse time string (CURDATE) at
position 0 ©: The timezone could not be found in the database.
2)Invalid field requested: HOUR(col2)

Anyone got a solution for this ?