...select sum(decode,team,'A',Position,0) Ateam,
sum(decode,team,'B',Position,0) Bteam,
sum(decode,team,'C',Position,0) Cteam From resultstab
group by team,position
having count(*) < 4
order by team,position
Haven't tried it, but it should be close. Might bog down the DB if it's a huge table..