Вы находитесь на странице: 1из 3

Pierre Parrend – Bases de Données Avancées, Module A

Bases de Données Avancées – Module A

IUT Lumière, License CE-STAT


2006-2007
Pierre Parrend

Exercices : SQL Avancé

A. Exercice A

Objectif de l'exercice:
Utiliser les notions de valeur nulle, tris, expressions statistiques en SQL

Les champs des tables de données sont les suivants:


ENO: Numéro d'employé (clé)
ENOM: Nom d'employé
PROF: Profession
DATEEMB: Date d'embauche
SAL: Salaire
COMM: Commission (un employé peut ne pas avoir de commission)
DNO: numéro de département
DNOM: Nom de département
DIR: Directeur du departement
VILLE: Localisation du département

Considérez les Tables de Données suivantes:

Employés:
ENO ENOM PROF DATEEMB SAL COMM DNO
10 Joe Ingénieur 1.10.93 4000 3000 3
20 Jack Technicien 1.5.88 3000 2000 2
30 Jim Vendeur 1.3.80 5000 5000 1
40 Lucy Ingénieur 1.3.80 5000 5000 3

Departements:
DNO DNOM DIR VILLE
1 Commercial 30 New York
2 Production 20 Houston
3 Développement 40 Boston

CE-STAT, IUT Lumière 2006-2007


Pierre Parrend – Bases de Données Avancées, Module A

Exprimez les requêtes suivantes :


– en Algèbre relationnelle
– en SQL

Requête 1:
Donnez la liste des employés ayant une commision

Requête 2:
Donnez les noms, emplois et salaires des employés par emploi croissant, et pour chaque emploi, par
salaire décroissant

Requête 3:
Donnez le salaire moyen des employés

Requête 4:
Donnez le salaire moyen du département Production

Requête 5:
Donnes les numéros de département et leur salaire maximum

Requête 6:
Donnez les noms des employés ayant le salaire maximum dans chaque département

Requête 7:
Donnez les différentes professions et leur salaire moyen

Requête 8:
Donnez le salaire moyen par profession le plus bas

Requête 9:
Donnez le ou les emplois ayant le salaire moyen le plus bas, ainsi que ce salaire moyen

B. Exercice B

Création de tables

Donnez les requêtes SQL qui permettent de créer les tables suivantes. Indiquer les contraintes sur
les champs, ainsi que les clés primaires et étrangères.

Table Magasin, qui contient les champs suivants:


– nom du magasin
– nom du gérant
– prénom du gérant
– date de création
– nombre de clients
– chiffre d'affaire.

CE-STAT, IUT Lumière 2006-2007


Pierre Parrend – Bases de Données Avancées, Module A

Table Personne, qui contient les champs suivants:


– prénom
– nom
– fonction (gérant, employé, client)
– telephone
– date de naissance.

CE-STAT, IUT Lumière 2006-2007

Вам также может понравиться

  • Atelier 3 PDF
    Atelier 3 PDF
    Документ6 страниц
    Atelier 3 PDF
    abdelghani8moro
    Оценок пока нет
  • SQL Sous Oracle Serie 1
    SQL Sous Oracle Serie 1
    Документ3 страницы
    SQL Sous Oracle Serie 1
    Brazza In My Veins
    100% (1)
  • D50079FR20 sg3 PDF
    D50079FR20 sg3 PDF
    Документ364 страницы
    D50079FR20 sg3 PDF
    ken merveil sinsa bilongo
    Оценок пока нет
  • Cours Complet SGBD SQL Avance
    Cours Complet SGBD SQL Avance
    Документ30 страниц
    Cours Complet SGBD SQL Avance
    Oussama D. Otaku
    Оценок пока нет
  • Gestion Performance1
    Gestion Performance1
    Документ4 страницы
    Gestion Performance1
    djenarbe
    Оценок пока нет
  • D49990FR10 SG
    D49990FR10 SG
    Документ426 страниц
    D49990FR10 SG
    supower
    Оценок пока нет
  • D49996FR10 sg2
    D49996FR10 sg2
    Документ282 страницы
    D49996FR10 sg2
    supower
    Оценок пока нет
  • Installation2 D'oracle Database 12c Sous Windows
    Installation2 D'oracle Database 12c Sous Windows
    Документ13 страниц
    Installation2 D'oracle Database 12c Sous Windows
    toky zandry
    Оценок пока нет
  • Chapitre 3 Demarrage Et Arret de BD
    Chapitre 3 Demarrage Et Arret de BD
    Документ22 страницы
    Chapitre 3 Demarrage Et Arret de BD
    Jaw Her
    Оценок пока нет
  • Ch2 Abd L3sci
    Ch2 Abd L3sci
    Документ18 страниц
    Ch2 Abd L3sci
    Adem Sidou
    Оценок пока нет
  • Cours DBAOracle
    Cours DBAOracle
    Документ53 страницы
    Cours DBAOracle
    abidou
    Оценок пока нет
  • Oracle RMAN Utilities
    Oracle RMAN Utilities
    Документ17 страниц
    Oracle RMAN Utilities
    sultance
    Оценок пока нет
  • Méthodologie de Tuning
    Méthodologie de Tuning
    Документ14 страниц
    Méthodologie de Tuning
    niainaeloi_842256206
    Оценок пока нет
  • Architecture Oracle 10 G
    Architecture Oracle 10 G
    Документ124 страницы
    Architecture Oracle 10 G
    Mohamed Othmani
    100% (1)
  • DBAingTD3v1 Oracle Khaled Jouini
    DBAingTD3v1 Oracle Khaled Jouini
    Документ2 страницы
    DBAingTD3v1 Oracle Khaled Jouini
    infcom
    Оценок пока нет
  • BIRT Guide
    BIRT Guide
    Документ60 страниц
    BIRT Guide
    Lassaad Ben Hadj
    Оценок пока нет
  • 2021 Oracle 12c TP1 +guide Installation VVVVFFF
    2021 Oracle 12c TP1 +guide Installation VVVVFFF
    Документ33 страницы
    2021 Oracle 12c TP1 +guide Installation VVVVFFF
    ABDESSADEQ EL MAKKIOUI
    Оценок пока нет
  • Chap 2 La Programmation en Java
    Chap 2 La Programmation en Java
    Документ42 страницы
    Chap 2 La Programmation en Java
    LaiLaLfk
    Оценок пока нет
  • Les Triggers SQL
    Les Triggers SQL
    Документ17 страниц
    Les Triggers SQL
    hocine fali
    Оценок пока нет
  • D50079FR20 sg2 PDF
    D50079FR20 sg2 PDF
    Документ334 страницы
    D50079FR20 sg2 PDF
    ken merveil sinsa bilongo
    Оценок пока нет
  • SQL A Module 01
    SQL A Module 01
    Документ32 страницы
    SQL A Module 01
    Abderrahim Belrhalia
    Оценок пока нет
  • Bases de Données Avancées
    Bases de Données Avancées
    Документ7 страниц
    Bases de Données Avancées
    Moïse TENGUE
    Оценок пока нет
  • Maitrisez La Configuration Apache Tomcat Sous Linux
    Maitrisez La Configuration Apache Tomcat Sous Linux
    От Everand
    Maitrisez La Configuration Apache Tomcat Sous Linux
    Оценок пока нет
  • 1 Bases de DonnÚes Objet Introduction
    1 Bases de DonnÚes Objet Introduction
    Документ32 страницы
    1 Bases de DonnÚes Objet Introduction
    Dioss Sadio Traore
    Оценок пока нет
  • T1 Module00 SQL
    T1 Module00 SQL
    Документ53 страницы
    T1 Module00 SQL
    قناة المبدع Creative channel
    Оценок пока нет
  • Dba 1 Chakraoui Med
    Dba 1 Chakraoui Med
    Документ186 страниц
    Dba 1 Chakraoui Med
    taoufik louhz
    Оценок пока нет
  • Java WEB
    Java WEB
    Документ17 страниц
    Java WEB
    mariembmg
    Оценок пока нет
  • Bases de Données Système SQL Server
    Bases de Données Système SQL Server
    Документ3 страницы
    Bases de Données Système SQL Server
    Khalil Khaled
    Оценок пока нет
  • Oracle PDF
    Oracle PDF
    Документ904 страницы
    Oracle PDF
    Rihab Ben Lamine
    Оценок пока нет
  • Cours Admin Oracle
    Cours Admin Oracle
    Документ113 страниц
    Cours Admin Oracle
    Badolo Issaka
    Оценок пока нет
  • Cours Oracle DBA
    Cours Oracle DBA
    Документ105 страниц
    Cours Oracle DBA
    Chakir Labari
    Оценок пока нет
  • Oracle 12c Administration
    Oracle 12c Administration
    Документ19 страниц
    Oracle 12c Administration
    Dida User
    Оценок пока нет
  • Administration ORACLE
    Administration ORACLE
    Документ69 страниц
    Administration ORACLE
    simon
    100% (1)
  • Cours BI Seance 3
    Cours BI Seance 3
    Документ47 страниц
    Cours BI Seance 3
    thouraya hadj hassen
    Оценок пока нет
  • Installation Oracle21cXE
    Installation Oracle21cXE
    Документ3 страницы
    Installation Oracle21cXE
    EMNA KANZARI
    Оценок пока нет
  • D59999FR10 sg1 PDF
    D59999FR10 sg1 PDF
    Документ328 страниц
    D59999FR10 sg1 PDF
    mo
    Оценок пока нет
  • Support de Cours TSQL 2000
    Support de Cours TSQL 2000
    Документ20 страниц
    Support de Cours TSQL 2000
    Joom LA
    Оценок пока нет
  • Oracle PL SQL
    Oracle PL SQL
    Документ7 страниц
    Oracle PL SQL
    Ach Ouaek
    Оценок пока нет
  • D59999FR10 sg2 PDF
    D59999FR10 sg2 PDF
    Документ306 страниц
    D59999FR10 sg2 PDF
    mo
    Оценок пока нет
  • Cours - 3 - PLSQL - ESTSB2
    Cours - 3 - PLSQL - ESTSB2
    Документ87 страниц
    Cours - 3 - PLSQL - ESTSB2
    Douaa
    Оценок пока нет
  • Système D'information Décisionnel: Data Science and Software Development
    Système D'information Décisionnel: Data Science and Software Development
    Документ11 страниц
    Système D'information Décisionnel: Data Science and Software Development
    SIHAM RAFIA
    Оценок пока нет
  • IntraWeb Tutorial - French
    IntraWeb Tutorial - French
    Документ53 страницы
    IntraWeb Tutorial - French
    Acosta
    Оценок пока нет
  • Cours Et Exercices Oracle PL SQL
    Cours Et Exercices Oracle PL SQL
    Документ84 страницы
    Cours Et Exercices Oracle PL SQL
    hh
    Оценок пока нет
  • Talend
    Talend
    Документ16 страниц
    Talend
    Master Yizu
    Оценок пока нет
  • Pour Oracle 12c: Guide de Formation
    Pour Oracle 12c: Guide de Formation
    Документ244 страницы
    Pour Oracle 12c: Guide de Formation
    FORMATION ORADIST
    Оценок пока нет
  • Installation Oracle
    Installation Oracle
    Документ38 страниц
    Installation Oracle
    Jean-Pierre Kouame
    Оценок пока нет
  • D50079FR20 sg1 PDF
    D50079FR20 sg1 PDF
    Документ350 страниц
    D50079FR20 sg1 PDF
    ken merveil sinsa bilongo
    Оценок пока нет
  • 09 JDBC
    09 JDBC
    Документ112 страниц
    09 JDBC
    Oumaima Alfa
    100% (1)
  • Memo OracleRMAN
    Memo OracleRMAN
    Документ30 страниц
    Memo OracleRMAN
    sultance
    Оценок пока нет
  • PHP Laravel BD
    PHP Laravel BD
    Документ32 страницы
    PHP Laravel BD
    Alioune
    Оценок пока нет
  • Privilege
    Privilege
    Документ5 страниц
    Privilege
    dono08
    Оценок пока нет
  • Programmation Shell Bash Sous Linux
    Programmation Shell Bash Sous Linux
    Документ14 страниц
    Programmation Shell Bash Sous Linux
    Lucien Eponou
    Оценок пока нет
  • Ionic Framework
    Ionic Framework
    Документ15 страниц
    Ionic Framework
    kyo007
    Оценок пока нет
  • Resumé
    Resumé
    Документ8 страниц
    Resumé
    Hinda dekkan
    Оценок пока нет
  • S
    S
    Документ2 страницы
    S
    Fsws
    Оценок пока нет
  • Exercices ORACLE - SQL Et SQL Plus
    Exercices ORACLE - SQL Et SQL Plus
    Документ19 страниц
    Exercices ORACLE - SQL Et SQL Plus
    geeekette
    100% (1)
  • Mini Projet
    Mini Projet
    Документ2 страницы
    Mini Projet
    Amine Lamane
    Оценок пока нет
  • Ed Rappelsql
    Ed Rappelsql
    Документ2 страницы
    Ed Rappelsql
    Yầšsïñể Mf
    Оценок пока нет
  • Td9 SQL Base Emp-Dep 2013
    Td9 SQL Base Emp-Dep 2013
    Документ3 страницы
    Td9 SQL Base Emp-Dep 2013
    Hajer Naas Ep Kasraoui
    Оценок пока нет
  • Fascicule de TP - SGBD Avancé
    Fascicule de TP - SGBD Avancé
    Документ29 страниц
    Fascicule de TP - SGBD Avancé
    Imed Abbassi
    100% (1)
  • Snort
    Snort
    Документ6 страниц
    Snort
    haythem.gigi7555
    0% (1)
  • Lettre de Motivation
    Lettre de Motivation
    Документ1 страница
    Lettre de Motivation
    haythem.gigi7555
    100% (3)
  • L Ordinateur Individuel HS15
    L Ordinateur Individuel HS15
    Документ118 страниц
    L Ordinateur Individuel HS15
    haythem.gigi7555
    Оценок пока нет
  • Livre Massage PDF
    Livre Massage PDF
    Документ150 страниц
    Livre Massage PDF
    sakoa
    100% (4)
  • A La Poursuite de Pi
    A La Poursuite de Pi
    Документ292 страницы
    A La Poursuite de Pi
    BOUKHELIFA
    100% (3)