text: /* td7*/
  
  /*1*/
  SELECT COUNT (*)
  	FROM FILMS;
  
  /*2*/
  SELECT COUNT (*)
   FROM REALISATEURS,JOUENT,FILM,ACTEURS
    WHERE REALISATEURS.CODREAL=FILMS.CODREAL
    AND JOUENT.CODACT=ACTEURS.CODACT
    AND FILMS.CODFILM=JOUENT.CODFILM
    AND REALISATEURS.NOMREAL='Cameron'
    AND ACTEURS.SEXE='f'
    AND EXTRACT (YEAR FROM ACTEURS.DNAISSACT)>1970;
  
  
     /*3*/
     SELECT COUNT (DISTINCT NACT)
      FROM REALISATEURS R, FILMS F,JOUENT J
      WHERE R.CODREAL=F.CODREAL
       AND J.CODFILM=F.CODFILM
       AND NOMREAL='Cameron';
  
     /*4*/
     SELECT MAX (BUDGET)
      FROM FILMS;
  
     /*5*/
     SELECT TITREFILM
      FROM FILMS
       WHERE BUDGET =(SELECT MAX(BUDGET) FROM FILMS);
  
     /*6*/
     SELECT SUM(F.BUDGET)
      FROM REALISATEURS R,FILMS F
       WHERE R.CODREAL=F.CODREAL
        AND NOMREAL='Cameron';
  
  
     /*EXERCICE 2*/
  
     /*1*/
     SELECT COUNT(*), R.CODREAL, R.NOMREAL
     FROM FILMS F, REALISATEURS R
      WHERE F.CODREAL=R.CODREAL
       GROUP BY R.CODREAL, R.NOMREAL;
  
     /*2*/
     SELECT COUNT(DISTINCT J.NACT),R.CODREAL, R.NOMREAL,R.NATIONREAL
      FROM REALISATEURS R, FILMS F, JOUENT J
       WHERE R.CODREAL=F.CODREAL
        AND J.CODFILM=F.CODFILM
        GROUP BY R.CODREAL, R.NOMREAL, R.NATIONREAL;
  
  
     /*3*/
     SELECT SUM(F.BUDGET), R.NOMREAL, R.NATIONREAL
     FROM REALISATEUR R, FILMS F
     WHERE R.CODREAL=F.CODREAL
     AND F.CATEGORIE='Science-fiction'
     GROUP BY R.CODREAL, R.NOMREAL, R.NATIONACT;
  
  
  
     /*4*/
  
     SELECT COUNT(*)R.NOMREAL, R.NATIONREAL
     FROM REALISATEUR R, FILMS F
     WHERE R.CODREAL=F.CODREAL
     GROUP BY R.CODREAL, R.NOMREAL, R.NATIONREAL, F.CATEGORIE;
  
  
     /*EXERCICE 3*/
  
  
     /*1*/
     SELECT A.NOMACT, A.PRENOMACT
     FROM ACTEURS A, JOUENT J
      WHERE A.CODEACT=J.NACT
       AND NATIONACT='AMERICAIN'
       GROUP BY A.CODACT, A.NOMACT, A.PRENOMACT
       HAVING COUNT(DISTINCT CODFILM) <2;
  
     /*2*/
     SELECT R.NOMREAL, R.PRENOMREAL
      FROM REALISATEURS R, FILMS F
      WHERE R.CODREAL=F.CODREAL
       AND CATEGORIE='Science-fiction'
       GROUO BY R.CODREAL, R.NOMREL, R.NATIONREAL
       HAVING SUM(BUDGET)<1000000;
  
     /*3*/
     SELECT A.NOMACT, A.PRENOMACT
      FROM ACTEURS A, JOUENT J
      WHERE A.CODACT=J.CODACT
      GROUP BY A.CODACT, A.NOMACT, A.PRENOMACT
      HAVING COUNT(*)>(SELECT COUNT(*)
       FROL JOUENT J, ACTEUR A
       WHERE A.CODACT=J.CODACT
        AND A.NOMACT = 'Winsley'
        AND A.PRENOMACT = 'Cathe';
  
     /*4*/
     SELECT A.CODACT, A.NOMACT
     FROM ACTEUR A, JOUENT J
     WHERE A.CODEACT=J.CODEACT
      GROUP BY A.CODACT, A.NOMACT
  		HAVING COUNT(*) = (SELECT MAX(COUNT(*))
       FROM JOUENT
       GROUP BY NACT;
  