1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| public function query5() { $num = DB::table('student')->count(); var_dump($num);
$max = DB::table('student')->max('age'); var_dump($max);
$min = DB::table('student')->min('age'); var_dump($min);
$avg = DB::table('student')->avg('age'); var_dump($avg);
$sum = DB::table('student')->sum('age'); var_dump($sum); }
|