Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorhaakon


    I want to fetch "sum(answers), sum(hangups), avg(duration)" and group by agent_id.

    But it seems like it's not possible to use a user defined select with find(), or any of the like.

    Tried something like this:

      'select' => 'SUM(answers), SUM(hangups), AVG(duration), *',
      'conditions' => array(),
      'include' => 'agent',
      'group' => 'agent_id'

    But akelos doesn't bother much with the "select" statement.

    What am I missing here. Are there any nifty function to do this? I know about the avg() and sum() functions, but this is only for one field at a time, right?