update
parent
83e7254c6e
commit
fb20a2d87b
|
|
@ -33,16 +33,16 @@ use SoftDeletes;
|
||||||
$model = self::with('dataset')->whereHas('dataset',function($query) use ($years){
|
$model = self::with('dataset')->whereHas('dataset',function($query) use ($years){
|
||||||
$query->whereIn('tahun',$years);
|
$query->whereIn('tahun',$years);
|
||||||
})->where('dataset_id',$datasetId)->selectRaw('
|
})->where('dataset_id',$datasetId)->selectRaw('
|
||||||
SUM(tidak_sekolah_l) as ts_l,
|
SUM(REPLACE(tidak_sekolah_l,",",".")::numeric ) as ts_l,
|
||||||
SUM(tidak_sekolah_p) as ts_p,
|
SUM(REPLACE(tidak_sekolah_p,",",".")::numeric ) as ts_p,
|
||||||
SUM(sd_p) as dasar_p,
|
SUM(REPLACE(sd_p,",",".")::numeric ) as dasar_p,
|
||||||
SUM(sd_l) as dasar_l,
|
SUM(REPLACE(sd_l,",",".")::numeric ) as dasar_l,
|
||||||
SUM(sltp_p) as smp_p,
|
SUM(REPLACE(sltp_p,",",".")::numeric ) as smp_p,
|
||||||
SUM(sltp_l) as smp_l,
|
SUM(REPLACE(sltp_l,",",".")::numeric ) as smp_l,
|
||||||
SUM(slta_smk_p) as sma_p,
|
SUM(REPLACE(slta_smk_p,",",".")::numeric ) as sma_p,
|
||||||
SUM(slta_smk_l) as sma_l,
|
SUM(REPLACE(slta_smk_l,",",".")::numeric ) as sma_l,
|
||||||
SUM(pt_l) as univ_l,
|
SUM(REPLACE(pt_l,",",".")::numeric ) as univ_l,
|
||||||
SUM(pt_p) as univ_p
|
SUM(REPLACE(pt_p,",",".")::numeric ) as univ_p
|
||||||
')->get();
|
')->get();
|
||||||
// Sekolah::selectRaw('SUM(jumlah_siswa) as total_siswa, SUM(jumlah_guru) as total_guru')->first();
|
// Sekolah::selectRaw('SUM(jumlah_siswa) as total_siswa, SUM(jumlah_guru) as total_guru')->first();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue