Filtering Issue on SQL query

Dear all,

I have an issue with my grids.
I have this query to load my grid :
SELECT CONCAT( ‘…/media/loupe.png^edit^javascript:createWindowManteia(’, cast( e.id AS CHAR( 7 ) ) , ‘,71,1’, ‘)^_self’ ) AS detail, e.id, CONCAT( e.code, ’ : ‘, e.nom ) as etude , DATE_FORMAT(date_debut,’%d/%m/%Y’) as date_debut , count( role ) as nb,CONCAT( ‘…/media/ajouter.png^Ajouter des participations investigateurs^javascript:createWindowManteia(’, cast( e.id AS CHAR( 7 ) ) , ‘,70,1’, ‘)^_self’ ) AS ajout FROM phs_etude e LEFT JOIN phs_participation p ON e.id = p.etude WHERE statut = ‘OUI’ GROUP BY e.id

When I try to filter in the grid (for example value 2 in field ‘nb’) I reach this query/error :
SELECT CONCAT( ‘…/media/loupe.png^edit^javascript:createWindowManteia(’, cast( e.id AS CHAR( 7 ) ) , ‘,71,1’, ‘)^_self’ ) AS detail,
e.id, CONCAT( e.code, ’ : ‘, e.nom ) as etude , DATE_FORMAT(date_debut,’%d/%m/%Y’) as date_debut , count( role ) as nb,
CONCAT( ‘…/media/ajouter.png^Ajouter des participations investigateurs^javascript:createWindowManteia(’, cast( e.id AS CHAR( 7 ) ) , ‘,70,1’, ‘)^_self’ ) AS ajout
FROM phs_etude e LEFT JOIN phs_participation p ON e.id = p.etude WHERE statut = ‘OUI’ GROUP BY e.id WHERE nb LIKE ‘%2%’

!!!Uncaught Exception
Code: 0
Message: MySQL operation failed
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE nb LIKE ‘%2%’’ at line 1

How can I manage this issue please ?