app/Statistics/Repository/IndividualRepository.php
public function statsDeathBySexQuery(int $year1 = -1, int $year2 = -1): Builder
    {
        return $this->statsDeathQuery($year1, $year2)
                ->select(['d_month', 'i_sex', DB::raw('COUNT(*) AS total')])
                ->join('individuals', static function (JoinClause $join): void {
                    $join
                        ->on('i_id', '=', 'd_gid')
                        ->on('i_file', '=', 'd_file');
                })
                ->groupBy('i_sex');
    }
public function statsDeathBySexQuery(int $year1 = -1, int $year2 = -1): Builder
    {
        return $this->statsDeathQuery($year1, $year2)
                ->select(['d_month', 'i_sex', DB::raw('COUNT(*) AS total')])
                ->join('individuals', static function (JoinClause $join): void {
                    $join
                        ->on('i_id', '=', 'd_gid')
                        ->on('i_file', '=', 'd_file');
                })
                ->groupBy('i_sex');
    }
public function statsDeathBySexQuery ( int $ year1 = - 1 , int $ year2 = - 1 ) : Builder { return $ this -> statsDeathQuery ( $ year1 , $ year2 ) -> select ( [ 'd_month' , 'i_sex' , DB :: raw ( 'COUNT(*) AS total' ) ] ) -> join ( 'individuals' , static function ( JoinClause $ join ) : void { $ join -> on ( 'i_id' , '=' , 'd_gid' ) -> on ( 'i_file' , '=' , 'd_file' ) ; } ) -> groupBy ( 'i_sex' ) ; }
Get a list of death dates.

@param int  $year1
@param int  $year2

@return Builder
Get a list of death dates .