I know what is the logic you will used to identify open bugs and closed bugs. also am not sure how you will get fixed by. When you are getting count of open/closed bugs, its not possible to get fixed by column..
I have provided sample, to get projectname, releasephase and closed bugs count.
<pre lang="sql">select distinct projectname,releasephase,
(Select COUNT(1) from Bug where Projectid=a.projectid and releasephaseid=a.releasephaseid and
bugid in (select bugid from bughistory where tostatus='Closed')) as Closedbugs
from bug a
inner join projects p on p.projectid=a.projectid
inner join ReleasePhase Rp on rp.releasephaseid=a.releasephaseid