where('pNo', 'No00000000768') ->where('oRDate', '>', $utcDateTime) ->where('sDate', 'exists', true) ->orderBy('sDate'); $count = $query->count(); dd($count);