0
I have the following table
I need to return only the last record of the teaching stage ordered by academic year, using Laravel/Mysql
Example: 2002 - 15 / 2004 - 16
I’m trying to:
$carga_horaria = DB::select(DB::raw('ch.*'))
->from(DB::raw('(SELECT * FROM estudantes_carga_horaria ORDER BY ano_letivo DESC) ch'))
->groupBy('ch.etapa_ensino_id')
->get();