calculer pourcentage mysql code example
Example: calculer pourcentage mysql
SET @total = (
SELECT COUNT(id_gest_dossier)
FROM t_users_dossiers);
SELECT id_user,
COUNT(id_gest_dossier),
ROUND(COUNT(id_gest_dossier)/@total*100,3) AS '%'
FROM t_users_dossiers
GROUP BY id_user;