Php SQL查询转换为laravel

Php SQL查询转换为laravel,php,mysql,laravel,Php,Mysql,Laravel,如何将此mysql查询转换为laravel SELECT count(income) as val, income,`search` FROM shoes_audience_insights WHERE search='Adidas-SG' GROUP BY income,`search` HAVING count(income) > 0 ORDER BY count(income) DESC LIMIT 100000 使用查询生成器: DB::table('shoes_audience

如何将此mysql查询转换为laravel

SELECT count(income) as val, income,`search` FROM shoes_audience_insights WHERE search='Adidas-SG' GROUP BY income,`search` HAVING count(income) > 0 ORDER BY count(income) DESC LIMIT 100000
使用查询生成器:

DB::table('shoes_audience_insights')->selectRaw(' count(income) as val, income,search')->where('search','Adidas-SG')->groupBy(['income','search'])->havingRaw('val>0')->orderBy('val','desc')->limit(100000);