laravel如何实现下面这种sql

laravel如何实现下面这种sql
SELECT (SELECT count(uid) as login_count FROM jy_data_rank where uid = p.uid and time = '2019/12/06' ) FROM jy_personal_users as p where (SELECT count(uid) as login_count FROM jy_data_rank where uid = p.uid )

最佳答案

DB::select('select ...')