Requête 2

R2 : Les auteurs qui ont écrit au moins deux films pendant la même année.
Requête utilisée :
SELECT *
FROM `Intervenant` AS I, `IntervenantSurOeuvre` AS ISO1, `Oeuvre` AS O1
WHERE I.`IntervenantId` = ISO1.`IntervenantId`
AND O1.`OeuvreId` = ISO1.`OeuvreId`
AND O1.`TypeOeuvre` = 'Film'
AND ISO1.`TypeIntervenant` = 'Auteur'
AND EXISTS
        ( SELECT ISO2.`IntervenantId`
          FROM  `IntervenantSurOeuvre` AS ISO2, `Oeuvre` AS O2
          WHERE I.`IntervenantId` = ISO2.`IntervenantId`
          AND O2.`OeuvreId` = ISO2.`OeuvreId`
          AND O2.`TypeOeuvre` = 'Film'                                       -- film
          AND ISO2.`TypeIntervenant` = 'Auteur'                              -- écrit
          AND O2.`AnneeCreation` = O1.`AnneeCreation`                        -- la même année
          AND O1.`OeuvreId` != O2.`OeuvreId` )                               -- mais différent du premier
LIMIT 30 OFFSET 0;
Nombre d’intervenants : 3542
ID Nom Prénom Genre (acteur)
1977AllenRichard JamesActeur
1977AllenRichard JamesActeur
2221AltonPeterActeur
2221AltonPeterActeur
2974AndrewsNicActeur
2974AndrewsNicActeur
3897ArmstrongBrad (I)Acteur
3897ArmstrongBrad (I)Acteur
3897ArmstrongBrad (I)Acteur
4256AshJonathonActeur
4256AshJonathonActeur
4703AukermanScottActeur
4703AukermanScottActeur
5015AzariShojaActeur
5015AzariShojaActeur
5015AzariShojaActeur
5015AzariShojaActeur
5015AzariShojaActeur
5015AzariShojaActeur
5199BacchusJohnActeur
5199BacchusJohnActeur
5199BacchusJohnActeur
5199BacchusJohnActeur
5199BacchusJohnActeur
6007BancilParv (I)Acteur
6007BancilParv (I)Acteur
6226BarattaAdamActeur
6226BarattaAdamActeur
6421BarkerIrwinActeur
6421BarkerIrwinActeur