Fatal error: Call to a member function execute() on a non-object - db_select() addExpression
The addExpression method returns the unique alias that was assigned for this expression, and thus cannot be chained.

Please look at this example and the document.

$q = db_select('parser_subtasks', 'st')
 -&gt;condition('QueueID', $task['ID'])
 -&gt;condition('IsDone', 0);
$q-&gt;addExpression('MIN(Delay)');
$min_time = $q-&gt;execute()-&gt;fetchField();