i have this script where i'm used to do a simple projection for a dynamic result

```
    SELECT 
    M.nom_utilisateur, 
    SUM(M.montant_bulletin ) as Montant_Total_BS,
    SUM(M.montant_payer   ) as Montant_Total_payer,
    COUNT(M.ref_bs ) as nbr_bs_total,

(SELECT COUNT(*) FROM mutuelle_bi.`Mutuelle` WHERE nom_utilisateur = M.nom_utilisateur  AND (M.nom_assurence  = "Star" AND M.etat_bs = "Remboursé")) as nbr_bs_total_payer,

(SELECT COUNT(*) FROM mutuelle_bi.`Mutuelle` WHERE nom_utilisateur = M.nom_utilisateur  AND (M.nom_assurence  = "Star" AND M.etat_bs = "Non remboursé")) as nbr_bs_non_payer,

(SELECT COUNT(*) FROM mutuelle_bi.`Mutuelle` WHERE nom_utilisateur = M.nom_utilisateur  AND (M.nom_assurence  = "Star" AND M.etat_bs = "En cours")) as nbr_bs_en_cours,

(SELECT COUNT(*) FROM mutuelle_bi.`Mutuelle` WHERE nom_utilisateur = M.nom_utilisateur  AND (M.nom_assurence  = "Star" AND M.etat_bs = "Nouveau")) as nbr_bs_nouveau
    FROM mutuelle_bi.`Mutuelle` M
    WHERE M.nom_assurence  = "Star"
    GROUP BY M.nom_utilisateur

```

but something goes wrong ; as i have this error :

> 
> 1055 - Expression #5 of SELECT list is not in GROUP BY clause and
>  contains nonaggregated column 'mutuelle\_bi.M.etat\_bs' which is not
>  functionally dependent on columns in GROUP BY clause; this is
>  incompatible with sql\_mode=only\_full\_group\_by
> 
> 
> 

[![enter image description here](https://i.stack.imgur.com/ra8Dm.png)](https://i.stack.imgur.com/ra8Dm.png)

How may i modify my script by the way to solve this problem , 
**given that i shouldn't modify any config file of my sql server** . and i should only write scripts

Any Suggestions ??