Is it possible to use the DB::expr() method for the SELECT section of the ORM query and get the COUNT() or MAX() of a certain column?
Code:
$history = History::find('all', array(
'select' => DB::expr('MAX(value)'),
'limit' => 100
));
Error:
Fuel\Core\Database_Exception [ Error ]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.MAX(value)' in 'field list' with query: "SELECT `t0`.`MAX(value)` AS `t0_c0`, `t0`.`id` AS `t0_c1` FROM `history` AS `t0` LIMIT 100"