public function total() { $result = Trainer::select(DB::raw('sum(full_time_male) as male, sum(full_time_female) as female, sum(full_time_male) + sum(full_time_female) as total'))->whereIn('report_date_id', ReportDate::select('id')->where('petsa', $this->petsa)->lists('id'))->whereIn('institution_id', Institution::select('id')->where('region_id', $this->region_id)->lists('id'))->get(); return $result; }
public function ie_mse_operators() { $result = IndustryExtension2::select(DB::raw('sum(starter_enterprise) as starter_enterprise, sum(starter_mse_operator_male) as starter_mse_operator_male, sum(starter_mse_operator_female) as starter_mse_operator_female, sum(starter_mse_operator_supported_male) as starter_mse_operator_supported_male, sum(starter_mse_operator_supported_female) as starter_mse_operator_supported_female, sum(advance_enterprise) as advance_enterprise, sum(advance_mse_operator_male) as advance_mse_operator_male, sum(advance_mse_operator_female) as advance_mse_operator_female, sum(advance_mse_operator_supported_male) as advance_mse_operator_supported_male, sum(advance_mse_operator_supported_female) as advance_mse_operator_supported_female, sum(competent_enterprise) as competent_enterprise, sum(competent_mse_operator_male) as competent_mse_operator_male, sum(competent_mse_operator_female) as competent_mse_operator_female, sum(competent_mse_operator_supported_male) as competent_mse_operator_supported_male, sum(competent_mse_operator_supported_female) as competent_mse_operator_supported_female'))->whereIn('report_date_id', ReportDate::select('id')->where('petsa', $this->petsa)->lists('id'))->whereIn('institution_id', Institution::select('id')->where('region_id', $this->region_id)->lists('id'))->get(); return $result; }
public function disabilities() { $result = FormalTraining::select(DB::raw('sum(mental_male) as mental_male, sum(mental_female) as mental_female, sum(visual_male) as visual_male, sum(visual_female) as visual_female, sum(hearing_male) as hearing_male, sum(hearing_female) as hearing_female, sum(physical_male) as physical_male, sum(physical_female) as physical_female'))->whereIn('report_date_id', ReportDate::select('id')->where('petsa', $this->petsa)->lists('id'))->whereIn('institution_id', Institution::select('id')->where('region_id', $this->region_id)->lists('id'))->get(); return $result; }