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
');
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1VoMr73
via IFTTT
Aucun commentaire:
Enregistrer un commentaire