prova così
codice:select valore,sum(quanti) as volte from (select campo1 as valore,count(campo1) as quanti from tabella group by campo1 union all select campo2 as valore,count(campo2) as quanti from tabella group by campo2 union all select campo3 as valore,count(campo3) as quanti from tabella group by campo3 union all select campo4 as valore,count(campo4) as quanti from tabella group by campo4 ) as tab group by valore

Rispondi quotando