How to get the average time in Laravel
问题 I want get the the average time between start-time and end-time and Where CUR-Time GroupBY user-name i written the sql in laravel it's showing some error i can't find what's that because i'm new to that laravel please help to fix this sql error i submit the my sql and the error message. $avagTime = DB::table( 'active_user' ) ->select(DB::raw('AVG(TIME_TO_SEC(acu_et) - TIME_TO_SEC(acu_at))')) ->where (DATE('acu_at') == ('CURDATE()')) ->get();[![enter image description here][1]][1] 回答1: Try