我正在尝试将下面的mysql查询转换为等效的laravel查询。
select email from emails order by call_count + receive_count desc;
拉雷维尔
DB::table('emails') ->select('email') ->orderBy(SUM('call_count','receive_count'), 'DESC') ->get();
请告诉我。。谢谢
nx7onnlm1#
试试这个
DB::table('emails') ->select('email') ->orderBy(DB::raw("`call_count` + `receive_count`"), 'desc') ->get();
1条答案
按热度按时间nx7onnlm1#
试试这个