$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
);
$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
);