Mysql
 sql >> Database >  >> RDS >> Mysql

Come convertire il generatore di query mysql in laravel

$results = DB::select(
    select * from pages where (phase_id, type) 
    in (
        select max(phase_id), type 
        from pages 
        where phase_id <= 2 
        and actived = 1 
        group by type
    ) 
    and actived = 1
);