How to convert this MySQL query to Laravel? – Phpmyadmin
Here my MySQL query (work in phpMyAdmin) : SELECT workcenter, (SUM(w1+w2 +w3 +w4)/ (COUNT(DISTINCT(teknisi))*40*4) )*100 AS total FROM `team` GROUP by workcenter ORDER BY total then, i try in Laravel Sintax like this below (not work) : $sql = Team::groupBy('workcenter')->select('workcenter',…