Mysql变量返回null值

Hello Everyone i am facing a problem that i am doing some calculations and storing it into variable its working fine but when i declare another variable which is equal to that variable is returning null.

This my query

$data = DB::table('extended_data')
    ->select(
    DB::raw('@Time_Spent_at_Sea := SUM(TIME_TO_SEC(SUBTIME(CONVERT("23:59 GMT", TIME), CONVERT(COSP_date_GMT, TIME))))')
    , DB::raw('@Total := @Time_Spent_at_Sea')
    )->get();

and this is my output

{"voyage-duration-chart-api":[{"@Time_Spent_at_Sea := SUM(TIME_TO_SEC(SUBTIME(CONVERT(\"23:59 GMT\", TIME), CONVERT(COSP_date_GMT, TIME))))":"45793140","@Total := @Time_Spent_at_Sea":null}]}