Una possibile soluzione
codice:select utente, sum(if(interesse='calcio',1,0)) as calcio, sum(if(interesse='golf',1,0)) as nuoto, sum(if(interesse='nuoto',1,0)) as golf from tabella group by utente having calcio > 0 and nuoto > 0 and golf > 0
Una possibile soluzione
codice:select utente, sum(if(interesse='calcio',1,0)) as calcio, sum(if(interesse='golf',1,0)) as nuoto, sum(if(interesse='nuoto',1,0)) as golf from tabella group by utente having calcio > 0 and nuoto > 0 and golf > 0