Can someone help me to convert this Raw Query to Eloquent? Thanks!
Raw Query:
$data = DB::select('
select prefix, mobile, doubles, count(*) as numbers
from contacts
join (
select count(*) as doubles
from (
select count(*)
from contacts
group by prefix, mobile
) as t1
) as t2 on contacts.id
where group_id = 1
group by prefix, mobile
limit 5
');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire