codice:
select tab.*, count(*)as conta
from
(
select all *
from esempio1.numeri where num1 in (3,5,11,16,24,29)
union all
select all *
from esempio1.numeri
where num2 in (3,5,11,16,24,29)
union all
select all *
from esempio1.numeri
where num3 in (3,5,11,16,24,29)
union all
select all *
from esempio1.numeri
where num4 in (3,5,11,16,24,29)
union all
select all *
from esempio1.numeri
where num5 in (3,5,11,16,24,29)
union all
select all *
from esempio1.numeri
where num6 in (3,5,11,16,24,29)
union all
select all *
from esempio1.numeri
where num7 in (3,5,11,16,24,29)
union all
select all *
from esempio1.numeri
where num8 in (3,5,11,16,24,29)
union all
select all *
from esempio1.numeri
where num9 in (3,5,11,16,24,29)
union all
select all *
from esempio1.numeri
where num10 in (3,5,11,16,24,29)
)tab
group by giorno,estrazione
having count(*)>1
order by conta