i found some solutions for Zend\Db\Sql SQL aggregate functions, but they are not working for me :(
my old PDO Statement (works with "simple" PDO):
SELECT DISTINCT DATE_FORMAT(date, '%e') FROM termine WHERE MONTH(date) = ?
Solution for the first aggregate function:
$select->columns(array(new Expression("DISTINCT DATE_FORMAT(date, '%e')")));
But for second aggregate function i have no idea and cant find anything.
$select->where(array('MONTH(date)' => $month));
...is no solution, because it throws an error.
I know: one more table column (month) can be my solution ...but it is not good enough.
How can i use SQL aggregate functions as key in Zend\Db\Sql\Select()->where()?