Ré-écrire une requete sql pour qu'elle fonctionne sous oracle
Bonjour,
J'ai une requete ecrite en sql pour la base de donnée Mysql , je veux la changer pour fonctionner sous Oracle mais je ne sais pas comment faire ça!
C'est la requete:
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| select TRUNCATE(sum(CASE WHEN changeitem.newstring='Closed' and changeitem.groupid=changegroup.id and changegroup.issueid=jiraissue.id THEN 1 ELSE 0 END)/
(select count(jiraissue.id)
from jiraissue join project on( jiraissue.project=project.id)
join priority on(jiraissue.priority=priority.id ) and project.pname IN ('project1')),2) as avgBackAndForth, priority.pname as champ1,project.pname as champ2
from changeitem
join changegroup on (changeitem.groupid=changegroup.id)
join jiraissue on (jiraissue.id=changegroup.issueid)
join project on( jiraissue.project=project.id)
join priority on(jiraissue.priority=priority.id )
and project.pname IN ('project1')
and jiraissue.CREATED between '2011-05-18 00:00:00.0' and '2011-06-04 00:00:00.0'
group by champ1,champ2 ; |