skip to Main Content

Jquery – How To Get Unique Value From Foreach

I Want to Send My Query Result to ApexCharts, but the results is not what i am intended this is my query $queryPengadaanNonTender = DB::table('siapel_dokumen') ->where([['id_jenis_dokumen', '=','1'],['progres','=','100']]) ->join('siapel_pengadaan', 'siapel_dokumen.id_jenis_pengadaan', '=', 'siapel_pengadaan.id') ->select( DB::raw('COUNT(DISTINCT nama_paket) AS jml'), DB::raw('jenis_pengadaan as pengadaan'), DB::raw('tahun…

VIEW QUESTION

Sum of sum in Laravel model

I'm building a tool that has the following hierarchy: Client > Projects > Stages Each stage has a 'price' value. The project has a 'value' attribute, which is just the dynamic sum of its stages. Now, I also want the…

VIEW QUESTION

Laravel – How To Distinct By Year and GroupBy Category On Same Query?

I want to make a result from query after distinct and groupby This is My Code $results = DB::table('dokumen') ->join('pengadaan', 'dokumen.id_jenis_pengadaan', '=', 'pengadaan.id') ->select( DB::raw('COUNT(nama_paket) AS jml'), DB::raw('jenis_pengadaan as jenis_pengadaan'), DB::raw('tahun as tahun') ) ->groupBy('jenis_pengadaan', 'tahun') ->orderBy('tahun') ->get(); $hasil =…

VIEW QUESTION
Back To Top
Search